Swiper breakpoint base: viewport width or container width
0 reputation · 28 Apr 2026, 06:04 UTC
Goal
Determine whether Swiper breakpoint keys compare against the browser viewport width or the Swiper container element width in the installed release.
Constraints
Default breakpoint evaluation uses the viewport width, so resizing only the Swiper container may not update slidesPerView or spaceBetween. The breakpointsBase option can change the comparison base, but supported values differ across Swiper versions. Loop mode adds duplicate slides to the DOM, so rendered slide counts are unreliable for verifying the active breakpoint. Breakpoint updates can also be delayed when resize observation is disabled or the container is hidden.
Questions
- Which breakpointsBase values does the installed Swiper release support?
- Which method confirms the active breakpoint base without relying on loop-duplicated slide elements?
- What conditions delay breakpoint parameter updates after changing the comparison base?