[Help]: How to build an Embla Carousel Scrollbar #1030
-
Summaryhi :) @davidjerleke your library is very good. I love this 😄 I have "embla-carousel-react": "8.3.0" and I decided to make a scroll (scrollbar) The scrollbar works quite nicely but I have a problem... or rather, my slider does not integrate with the arrows and the rest of the carousel if I move the slider: I suppose that this piece of code is responsible for the potential errors and bugs that have occurred with me: Can I ask for help in solving the problem? 2024-10-14_13h53_09.mp4If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox example |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Also interested in a custom scrollbar. I took a look at your CodeSandbox example and it feels like there’s a state de-sync somewhere – the prev/next buttons aren’t picking up changes made via the scrollbar. |
Beta Was this translation helpful? Give feedback.
@imicadio @TmLev The CodeSandbox below is demonstrating the use of an
<input type="range">as a scroll bar. This setup is just for illustrative purposes — feel free to swap in any input element that suits your needs. The core functionality lies in thescrollToProgressfunction, which handles the scroll logic.