Repository navigation
How to get current 'index' of snapped scroll item in a mandatory scroll-snap carousel #6450
Unanswered
stijnwesterhof
asked this question in
Help
Replies: 1 comment 5 replies
|
I think this is probably more of a JavaScript rather than Tailwind question, but my first thought was to do something with the Intersection Observer API: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API |
5 replies
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.
Hi all,
I'm trying to build a (react) carousel with the new scroll-snap utility. I have it working but I want to improve the UX by showing some dots like you see in most carousels.
I was wondering if anyone knew a simple, but smart solution on getting some sort of index of what image is currently 'snapped'.
I hope my question is clear :)
All reactions