Swiper [slidesPerView]="auto" not working

Hi, I try to switch from ion-slides to swiper and most of the things are no problem, but I need slidesPerView as auto, which is not working.

I’ve in ion-slides:

<ion-slides [options]=“{ slidesPerView: ‘auto’, zoom: false, grabCursor: true }” pager=“true”

And now in swiper:

<swiper-container [pagination]=“true” [slidesPerView]=“auto” [grabCursor]=“true” [zoom]=“false”

Background:
I’ve a dynamic count of ion-cards with a static width, which should be horizontally scrollable when wider as the screen width.

Based on 3 ion-cards:
With

[slidesPerView]=“2”


→ 2 slides and pagination (as expected)

And with

[slidesPerView]=“auto”


→ just all slides, without pagination and without any swipe functionality

had to use
slides-per-view=“auto”

2 Likes