Replies: 2 comments 9 replies
-
Hi @jln13x, Thank you for your question.
In most cases your approach will work. But there are setups that makes things a bit more complicated. Especially these two options:
The reason for this is that they will group slides and reduce the number of snaps. As a result, the number of snaps will be less than the number of slides. How should we tackle that? Example: Slides are 25% wide so 4 slides fit within the viewport at the same time. slidesToScroll is set to 2, so slide 1 and 2 are one group (behaving as a single slide and share the same snap), and slide 3 and 4 are one group and so on... Let me know if you have any ideas. Best, |
Beta Was this translation helpful? Give feedback.
-
Hi again Julian (@jln13x), Thanks for clarifying. I see. Well I guess they don’t have to be mutually exclusive. I agree that the feature you’re suggesting would be a nice addition, but when introducing this feature we initially have to limit ourselves to this:
Best, |
Beta Was this translation helpful? Give feedback.
-
Hey there,
first of all: Embla is amazing, thanks for your work!
I constantly ran into the requirement to only style the currently snapped slide (usually the one in the center) and the plugin
embla-carousel-class-names
couldn't help with that. The closest option would be theselected
one however that applies to all visible slides which is not something that I want.Use Case:
So I went ahead and quickly wrote a plugin for it and published it to npm to reuse it across multiple projects. The plugin basically just adds a class and allows me to style it.
Would that be something for the
embla-carousel-class-names
-Plugin ?If so, I would go ahead and contribute to it and delete my stuff.
If not, is it ok for me to keep the plugin published? Anything I should add?
Thanks alot!
Beta Was this translation helpful? Give feedback.
All reactions