[Help]: Instantly set carousel slide index without animation #956
-
Which variants of Embla Carousel are relevant to this feature request?
Feature descriptionI’m building a gallery component in where clicking on an image opens a I want the selected image to appear instantly in the carousel without any scrolling animation and then be able to swipe slides from this position. Am I doing something wrong and this feature already exists? If it isn't, could it be considered for adding? Thank you.
Additional ContextAdditional details here... Before submitting
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @michaelprys, Have you read the docs? You can achieve what you want by setting the emblaApi.scrollTo(index, true); |
Beta Was this translation helpful? Give feedback.
Hi @michaelprys,
Have you read the docs? You can achieve what you want by setting the
startIndex
option or using thescrollTo
method with the instant/jump parameter set totrue
: