[Feat]: offset for fine tuned alignment of slides #1301
Unanswered
marcusmichaels
asked this question in
Ideas
Replies: 1 comment
-
|
PR submitted here: #1302 I've added tests and also tested in-situ, and it's working as intended :) Screen.Recording.2026-03-13.at.11.06.18.mov |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Which variants of Embla Carousel are relevant to this feature request?
Feature description
I've been building a carousel which interacts with elements outside of the main carousel, and I've been playing with aligning the first slide to the caption text that's triggered every time a new active slide is detected.
My issue right now is that I want the carousel to be visible for the full width of the area, and if I tweak the spacing or add padding to the left (to push slides to the right), we see the looped last item flicker in on interaction, and disappear on settle (see video).
Screen.Recording.2026-03-11.at.14.13.53.mov
I haven't been able to find a solution, so I'd like to suggest we add an "offset" that allows fine tuned alignment (negative values pull items left, positive values push to the right).
Additional Context
UPDATE:
Whilst building this out I discovered this can be achieved with a custom
alignfunction. Though I still think a dedicatedoffsetoption would be a valuable addition as it composes with the existing"start"/"center"/"end"and works naturally inbreakpoints.Before submitting
Beta Was this translation helpful? Give feedback.
All reactions