Replies: 1 comment 2 replies
-
Hi @chorgen,
Thanks for your question. Could you clarify a bit? Do you want dragging to be restricted to only progressing one slide per drag gesture (regardless of how vigorous the drag gesture was), and the scrollNext/scrollPrev to scroll by the number of slides that fit within the viewport? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
So I have this carousel with multiple slides per view. When scrolling with mouse and touch interactions I want it to behave like
slidesToScroll: 1
, but when I scroll with thescrollNext/Prev
function I want it to behave likeslidesToScroll: auto
.In other words, I want it to scroll by one “page” at the time only when using the scrollNext/Prev functions.
Is this possible? I suspect I need to make this with scrollTo(), but I’m not able to find an easy when to calculate this with the values the embla API expose.
If applicable, which variants of Embla Carousel are relevant to this question?
Additional information
No response
CodeSandbox example
No response
Beta Was this translation helpful? Give feedback.
All reactions