#8228·swiper

False warning while using breakpoints to change slidesPerView to same number as total slides

Author: blunketCreated Sep 2, 2026Updated Sep 2, 2026
Labelst0ggles

Check that this is really a bug

  • I confirm

Reproduction link

https://jsfiddle.net/7bzrwmcL/15/

Bug description

I am using breakpoints to set slidesPerView to the same number as the total number of slides (3) on larger widths. The total number of slides may increase in the future as this is integrated into a CMS and the client will be able to add more slides, but the layout will always show exactly 3 on desktop.

When there are 3 or fewer slides, I expect Swiper not to be active on large screens. It is working exactly as I expected, but I am seeing a javascript warning anyway. I have a jsfiddle demo linked in this issue.

Expected Behavior

No warning, as the slider is basically working as expected.

I would also like the ability to rearrange the slides to the original order when it disables itself, but that might be a whole feature request of its own.

Actual Behavior

Getting a warning:

"Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"

The warning accurately describes what is happening, but it implies that Swiper is misconfigured when it is not, and I'm not sure how to silence the error.

Swiper version

14.2.0

Platform/Target and Browser Versions

macOS, using Vivaldi browser

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR