Skip to content
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 not working #141

Open
larsvdd opened this issue Nov 19, 2024 · 1 comment
Open

Breakpoints not working #141

larsvdd opened this issue Nov 19, 2024 · 1 comment

Comments

@larsvdd
Copy link

larsvdd commented Nov 19, 2024

I updated to swiper 2.0.0 but after the migration steps my breakpoints aren't working anymore.

const swiper = useSwiper(mySlider, {
	autoplay: {
		delay: 8000,
		disableOnInteraction: true,
	},
	breakpoints: {
		768: {
			slidesPerView: 6,
		},
	},
	loop: true,
	slidesPerView: 3,
});

The swiper does render, but it is always 3 slides.

P.S. I would like to see a fix for SSR, I want the content to be indexed by search engines. So no more: <ClientOnly>

@cpreston321
Copy link
Owner

cpreston321 commented Nov 21, 2024

Hey @larsvdd I will definitely take a look if you could provide a reproduction in StackBlitz that would be great!

For the sever side.. I will definitely take a look the only problem is swiper web components is purely client based and will only register on the client side which causes issues with SSR. I will try to think of some approaches to solve this in the mean time.

Thanks,
CP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants