Swiper breakpoints not working for custom elements #7071
Unanswered
jehoshua-shey
asked this question in
Q&A
Replies: 2 comments 2 replies
-
It works with JSON.stringify(). breakpoints={
JSON.stringify({
768: {
slidesPerView: 6,
grid: {
rows: 1,
fill: 'row'
}
}
}
)} You could alternatively set the breakpoints attribute on the element when it's mounted. swiperContainer?.setAttribute(
'breakpoints',
JSON.stringify({
768: {
slidesPerView: 6,
grid: {
rows: 1,
fill: 'row'
}
}
})
); |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using SwiperJS custom elements in my NextJS project. I can seem to add breakpoints correctly case all I've done never worked including what was written in the demo code for responsive breakpoints on the SwiperJS website.
I would appreciate it if someone can put me through. I just nee breakpoints for my swipers.
Beta Was this translation helpful? Give feedback.
All reactions