Detect change in current slide #591
-
I would like to have a carousel that is synchronized with display of the slides. In my real example I have a map with dots for each slide, but I put together a simple CodeSandbox example where the slides in the carousel are also displayed in a simple HTML list. I want the user to be able to select a slide from the carousel or from the list and have the carousel and list both reflect that change. My challenge is that I don't understand how to detect when the user has scrolled to a new slide and correctly highlight that slide. I tried listening to the This seems like a natural use case, but I don't see it covered in the docs. https://codesandbox.io/s/embla-carousel-default-react-forked-nkn7ds?file=/src/js/EmblaCarousel.jsx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @michaelaltmann, Do you mean like this? Best, |
Beta Was this translation helpful? Give feedback.
Hi @michaelaltmann,
Do you mean like this?
Best,
David