-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoints based on Container width and not window width with ResizeObserver #4244
Labels
Comments
katerlouis
changed the title
Breakpoints based on Contaner width and not window width (like element queries)
Breakpoints based on Contaner width and not window width with ResizeObserver
Feb 17, 2021
katerlouis
changed the title
Breakpoints based on Contaner width and not window width with ResizeObserver
Breakpoints based on Container width and not window width with ResizeObserver
Feb 17, 2021
@ettoredn yes, thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I have a swiper instance with 3 slides. When they all fit inside the container, I want to disable sliding and all controls and just use swiper as a layout. When they don't fit the parent any longer, I want "swiper to be an actual slider with certain swiper settings"
Describe the solution you'd like
containerBreakpoints: {}
property that works just asbreakpoints: {}
does, but using ResizeObserver for width changes and notwindow.matchMedia()
orwindow.resize()
Describe alternatives you've considered
I guess I could do something similar myself. But I'm too afraid to run into bugs. Swiper is pretty complex and I've run into a lot of issues over the years, when trying fancy stuff with updating settings and killing and re-initializing the instance etc.
The text was updated successfully, but these errors were encountered: