Skip to content

slidesOffsetAfter and slidesOffsetBefore are breaking the slidesPerView #6916

@michalvadak

Description

@michalvadak

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-react-slides-per-view-forked-9sg53p?file=%2Fsrc%2FApp.jsx%3A8%2C1

Bug description

Setting the slidesOffsetAfter and slidesOffsetBefore breaks the slidesPerView.

Expected Behavior

When I have 3 slides and set slidesPerView: 3 with slidesOffsetAfter: 96 and slidesOffsetBefore: 96 I expect to see 3 slides with offset without the ability to swipe them.

Actual Behavior

The slides are slideable and I don't see the whole 3 slides.

Swiper version

10.1.0

Platform/Target and Browser Versions

macOS 13.5 (22G74) / Chrome - 115.0.5790.170 (arm64)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions