swiper icon indicating copy to clipboard operation
swiper copied to clipboard

feat(core): add `alignSlides` option to keep minimum full slides visi…

Open mofman opened this issue 6 months ago • 3 comments

Fixes: https://github.com/nolimits4web/swiper/discussions/4780

Currently it's possible for the swiper to fall out of alignment if a fractional value is set for slidesPerView and the user reaches the end of the swiper (as show below). The PR Introduces a new boolean param alignSlides (default false) in core defaults and when set to true ensures all sides are always aligned in their original place.

Screenshot 2025-06-16 at 01 02 18
  • Introduce new boolean param alignSlides (default false) in core defaults
  • Trim snapGrid so that only snaps leaving ≥ floor(slidesPerView) slides fully visible remain
  • Preserve original “right-flush” fallback only when alignSlides is disabled

mofman avatar Jun 16 '25 00:06 mofman

t0ggles-create swiper

nolimits4web avatar Sep 03 '25 16:09 nolimits4web

Task nolimits4web/SWIPER-171 was created

t0ggles task SWIPER-171

t0ggles[bot] avatar Sep 03 '25 16:09 t0ggles[bot]

Any chance of getting this merged reviewed/merged soon?

mofman avatar Nov 06 '25 10:11 mofman