How to get active item index on Carousel #628
Unanswered
bezchristo
asked this question in
Q&A
Replies: 1 comment
-
I'm afraid that's not possible without JS. daisyUI's carousel is just a scrollable area with scroll snap. We can have bullets or next/prev buttons using HTML anchor links but that's where a CSS-only image slider has limits, any other functionalities should be handled using JavaScript. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use the Carousel for a personal project but I am running into a bit of a hurdle. I want to display a few dots underneath the carousel to indicate which item is visible. In order to do that I need to be able to get the current visible item index somehow. Is there a way for me to do that? I can set the item when I click on a dot, but how will I get it when I scroll with my finger through the carousel?
Beta Was this translation helpful? Give feedback.
All reactions