Swiper Animation
This package has been deprecated
This package has been migrated to @cycjimmy/swiper-animation for scoped NPM package. Please switch to @cycjimmy/swiper-animation to stay up to date.
Install
# via npm $ npm install swiper-animation --save # or via yarn $ yarn add swiper-animation
Usage
Swiper Animation based on Swiper. Add Script of swiper in your project first.
; # ORconst SwiperAnimation = ; // use swiper 3.xconst swiperAnimation = ;const mySwiper3 = '.swiper-container' { swiperAnimation; } { swiperAnimation; }; // use swiper 4+const swiperAnimation = ;const mySwiper4 = '.swiper-container' on: { swiperAnimation; } { swiperAnimation; } ;
Add attribute on elements you want animated.
Animation
data-swiper-animation
: [Option] Animation class name for entering slide.data-swiper-animation-once
: [Option] One-time Animation class name for entering slide.data-duration
: [Option] Set animation-duration. Default:.5s
.data-delay
: [Option] Set animation-delay. Default:.5s
.data-swiper-out-animation
: [Option] Animation class name for leaving slide. Delay for leaving Animation is not supported.data-out-duration
: [Option] Set animation-duration for leaving slide. The value must be less than.5s
. Default:.5s
.
Animation Effect
- Recommended Animate.css
- Other Animation lib
- Custom animation
Use in browser
Slider1 Slider2 Slider3
CDN
To use via a CDN include this in your HTML:
<script src="https://cdn.jsdelivr.net/npm/swiper-animation@2/build/swiper-animation.min.js"></script>