I am using SWIPER API with my React App but I can not seem to get the autoplay feature working. Even though I have imported these features as shown with the code below
import { Swiper, SwiperSlide, Navigation, Pagination, Scrollbar, Autoplay } from 'swiper/react';
The other attributes, such as spaceBetween, onSwiper etc are working, but I cant seem to get the pagination, Navigation and autoplay to work, and their documentation is not entirely clear on how to implement these?
My code is shown below;
<Swiper className="swiperSlide"
spaceBetween={100}
autoplay Navigation Pagination
onSlideChange={() => console.log('slide change')}
onSwiper={(swiper) => console.log(swiper)}
>
<SwiperSlide className="slide-image slider1"></SwiperSlide>
<SwiperSlide className="slide-image slider2"></SwiperSlide>
<SwiperSlide className="slide-image slider3"></SwiperSlide>
<SwiperSlide className="slide-image slider4"></SwiperSlide>
</Swiper>
Is anyone able to provide an example of how I can get those to work? Please. Your help is much appreciated.
Swiper documentation: https://swiperjs.com/swiper-api#custom-build