[Help]: Swiping fast to skip multiple slides return the next slide #831
-
Summaryi'm encountering unexpected behavior in my carousel component when using multiple sliders per view. When I adjust the basis property to achieve a layout with 33.3333% width for each slider, and attempt to swipe quickly to skip multiple slides (e.g., from slide 1 to slide 4), the carousel snaps back to slide 2. Screen_Recording_20240421_090328_Chrome.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
-
@Kareem987 you can group slides with the option slidesToScroll: const [emblaRef] = useEmblaCarousel({ slidesToScroll: 'auto' }) There’s an example with this behavior here in the docs. Alternatively, if you still want to be able to scroll to individual slides, you can use the option skipSnaps instead: const [emblaRef] = useEmblaCarousel({ skipSnaps: true }) Best, |
Beta Was this translation helpful? Give feedback.
@Kareem987 you can group slides with the option slidesToScroll:
There’s an example with this behavior here in the docs.
Alternatively, if you still want to be able to scroll to individual slides, you can use the option skipSnaps instead:
Best,
David