I have a swiper that contains multiple slides (they don’t fit entirely on screen). I need the Swiper to have freeMode set to true so that on mobile the slides keep scrolling after touchEnd.
My problem is that even by using “sticky: true” inside freeMode{} the swiper won’t center the nearest slide to the center of the screen after the swiper stopped moving.
This is the code
<Swiper
slidesPerView={5}
centeredSlides={true}
// onSlideChangeTransitionEnd={onSlideChange}
modules={[Navigation, Pagination, Scrollbar, A11y]}
spaceBetween={0}
navigation
pagination={{ clickable: true }}
scrollbar={{ draggable: true }}
className={styles.swiper}
touchRatio={1.5}
longSwipes={true}
grabCursor={true}
cssMode={true}
slideActiveClass={styles.selectedSlide}
freeMode={{
enabled: true,
momentumBounce: true,
sticky: true,
}}
>
{slides}
</Swiper>