Responsive breakpoints

Created on 31 October 2022, about 2 years ago
Updated 18 April 2024, 7 months ago

Hi,
I need to change number of slides per view based on responsive breakpoints.
Just like that https://codesandbox.io/s/e56nh3?file=/index.html
How can I do that?

💬 Support request
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇮🇹Italy coolest

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue was unassigned.
  • 🇺🇸United States robbt

    I was able to get this working but I ran into a weird bug that it took a lot of troubleshooting to figure out.

    In my use case their should be one slidePerView by default but when I set slidesPerView: 1 it would break the responsiveness. I tried digging into the code but couldn't determine what was causing this.

    If I changed my default config to slidesPerView: auto it worked and the slides were responsive above the breakpoints and I still got the 1 slide on mobile that I was looking for.

    Just wanted to share this in case anyone else was running into a similar problem.

    I'd love for this functionality to be added to the module but I can imagine that it isn't a super easy task as it would require making the form somewhat dynamic to be able to add new breakpoints but I could also see having a number of predefined breakpoints that could be enabled and changed via the form would be another option.

  • 🇳🇱Netherlands dennis cohn

    Is this possible to get in the new release?

  • Status changed to Closed: duplicate 7 months ago
  • 🇳🇱Netherlands nk_

    This is just released in 2.0.x branch. Please check out this issue: https://www.drupal.org/project/swiper_formatter/issues/3441764 Breakpoints feature Needs review which shall stay as the only one related to this feature for the time being. Closing as duplicate.

Production build 0.71.5 2024