Skip to content

A quick demo which shows how to use the autoplay feature in Swiper React

License

Notifications You must be signed in to change notification settings

valnub/swiper-autoplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swiper React Autoplay Demo

Just a quick demo how to use autoplay feature in Swiper React.

How to run

$ npm install
$ npm run build && npm start

In a nutshell

Assuming you already have your swiper up and running, add this to turn on autoplay:

Add imports

import { Autoplay } from 'swiper';
import 'swiper/css/autoplay';

Create jsx

<Swiper
  modules={[Autoplay]}
  autoplay={{ delay: 1000 }}
  // Alternative with 3sec default timeout:
  // autoplay={true}
>
  {/* Add slides here */}
</Swiper>

About

A quick demo which shows how to use the autoplay feature in Swiper React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published