The properties of autoplay in the Swiper slider are:
delay: Specifies the time interval between each slide transition during autoplay. The default value is3000milliseconds (3 seconds).disableOnInteraction: Determines whether the autoplay should be paused when the user interacts with the slider. The default value istrue, meaning that the autoplay will stop when the user interacts with the slider.stopOnLastSlide: Determines whether the autoplay should be stopped when the slider reaches the last slide. The default value isfalse, meaning that the slider will continue to loop through the slides even after reaching the last slide.reverseDirection: Determines whether the autoplay should play the slides in reverse order after reaching the last slide. The default value isfalse, meaning that the autoplay will restart from the first slide after reaching the last slide.
Here’s an example of how to set these properties in Swiper:
var mySwiper = new Swiper(‘.swiper-container’, {
autoplay: {
delay: 5000,
disableOnInteraction: false,
stopOnLastSlide: true,
reverseDirection: true,
},
});
In this example, the slider will autoplay every 5 seconds, continue to play even if the user interacts with the slider, stop when it reaches the last slide, and play the slides in reverse order after reaching the last slide.