[Help]: Is there any way to stop when dragging and not letting go, switching to the next or previous one? #892
-
SummaryEmbla is an excellent library👍. I would like to ask, is there any way to achieve this effect? When I keep dragging and not letting go, it will keep switching to the next one. I want it to switch one and stop. This is the target effect. iShot_2024-06-04_14.06.41.mp4This is the Embla Carousel effect. iShot_2024-06-04_14.06.04.mp4If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@guangzan do you mean that the carousel should terminate the dragging and scroll to the next/closest slide? And the user has to grab the carousel with the pointer again if they want to drag it further? |
Beta Was this translation helpful? Give feedback.
-
Hi, @davidjerleke, Thanks for your reply. Yes, your description is even more accurate. |
Beta Was this translation helpful? Give feedback.
@guangzan thanks for your question. The answer is no, Embla is opinionated in this matter. The reasoning here is that releasing the pointer when the user didn't intend to release it is bad UX and harms accessibility. How do we know that the user didn't mean to scroll further?