[blocks]: Scroll Observer API #3877
giulianoo0
started this conversation in
Blocks Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The idea is a simple way to detect when a component is visible by wrapping it between a tag, similar to Bootstrap's Scrollspy implementation
I am willing to do it by myself and send a PR.
The following implementation is done through the IntersectionObserver API
https://github.com/shadcn-ui/ui/assets/169609749/9e841a12-8760-431b-9e80-5f2b14e3605d
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions