All Projects → cycjimmy → swiper-animation

cycjimmy / swiper-animation

Licence: MIT license
Easier way to run animations on swiper.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to swiper-animation

React Dynamic Swiper
React wrapper around iDangerous swiper that auto-magically re-initializes
Stars: ✭ 109 (+109.62%)
Mutual labels:  swiper
React Native Swiper Hooks
✨A powerful Swiper hooks component for React Native
Stars: ✭ 159 (+205.77%)
Mutual labels:  swiper
Tips-in-React
在 React 开发实际项目过程的使用心得
Stars: ✭ 15 (-71.15%)
Mutual labels:  swiper
React Native Ezswiper
swiper component for react-native
Stars: ✭ 123 (+136.54%)
Mutual labels:  swiper
Swiper
Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Stars: ✭ 1,948 (+3646.15%)
Mutual labels:  swiper
React Swipes
🔥 基于React的移动端卡片滑动组件
Stars: ✭ 177 (+240.38%)
Mutual labels:  swiper
Vue Swipe Mobile
😃 A siwpe (touch slider) component for Vue2
Stars: ✭ 97 (+86.54%)
Mutual labels:  swiper
react-native-reanimated-carousel
🎠 React Native swiper/carousel component, fully implemented using reanimated v2, support to iOS/Android/Web. (Swiper/Carousel)
Stars: ✭ 1,461 (+2709.62%)
Mutual labels:  swiper
Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (+200%)
Mutual labels:  swiper
.emacs.d
My Emacs Config
Stars: ✭ 22 (-57.69%)
Mutual labels:  swiper
React Native Web Swiper
Swiper-Slider for React-Native and React-Native-Web
Stars: ✭ 125 (+140.38%)
Mutual labels:  swiper
Vue Plain Slider
A simple slider component for Vue.js
Stars: ✭ 146 (+180.77%)
Mutual labels:  swiper
Vue Fallowfish
🐠vue全家桶仿闲鱼部分布局以及功能实现
Stars: ✭ 211 (+305.77%)
Mutual labels:  swiper
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (+125%)
Mutual labels:  swiper
amazin
A MERN-stack app for eCommerce platform, Webshop, Web Store. Storybook: https://www.amazin.one/ Alternative: https://ntrix.github.io/amazin-story
Stars: ✭ 27 (-48.08%)
Mutual labels:  swiper
React Id Swiper
A library to use idangerous Swiper as a ReactJs component which allows Swiper's modules custom build
Stars: ✭ 1,361 (+2517.31%)
Mutual labels:  swiper
Hswiper Wx
微信小程序swiper插件
Stars: ✭ 167 (+221.15%)
Mutual labels:  swiper
vue-active-swiper
🌴 A Mobile-oriented、No dependencies、Lightweight Swiper component for Vue
Stars: ✭ 33 (-36.54%)
Mutual labels:  swiper
avy-migemo
avy with migemo
Stars: ✭ 16 (-69.23%)
Mutual labels:  swiper
React Native Swiper Flatlist
👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox
Stars: ✭ 217 (+317.31%)
Mutual labels:  swiper

Swiper Animation

libraries dependency status libraries sourcerank Coverage Status Release date rollup semantic-release jest npm license

  • Easier way to run animations on swiper. (Demo)
  • swiper-animation has been renamed to @cycjimmy/swiper-animation for scoped NPM package.

Install

NPM version NPM bundle size npm download

# via npm
$ npm install @cycjimmy/swiper-animation --save

# or via yarn
$ yarn add @cycjimmy/swiper-animation

Usage

Swiper Animation based on Swiper. Add Script of swiper in your project first.

import SwiperAnimation from '@cycjimmy/swiper-animation';

# OR
const SwiperAnimation = require('@cycjimmy/swiper-animation');

// use swiper 3.x
const swiperAnimation = new SwiperAnimation();
const mySwiper3 = new Swiper('.swiper-container', {
  onInit: function(swiper) {
    swiperAnimation.init(swiper).animate();
  },
  onSlideChangeEnd: function(swiper) {
    swiperAnimation.init(swiper).animate();
  }
});

// use swiper 4+
const swiperAnimation = new SwiperAnimation();
const mySwiper4 = new Swiper('.swiper-container', {
  on: {
    init: function () {
      swiperAnimation.init(this).animate();
    },
    slideChange: function () {
      swiperAnimation.init(this).animate();
    }
  }
});

Add attribute on elements you want animated.

<div 
  data-swiper-animation="animate__fadeIn" 
  data-duration=".5s" 
  data-delay="1s" 
  data-swiper-out-animation="animate__fadeOut"
  data-out-duration=".2s"
>Animation</div>
  • 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

<link href="animate.min.css" rel="stylesheet">
<link href="swiper.min.css" rel="stylesheet">

<div class="swiper-container">
  <div class="swiper-wrapper">
    <div class="swiper-slide">
      <div data-swiper-animation="animate__fadeIn">Slider1</div>
    </div>
    <div class="swiper-slide">
      <div data-swiper-animation="animate__fadeIn" data-duration=".5s">Slider2</div>
    </div>
    <div class="swiper-slide">
      <div data-swiper-animation="animate__fadeIn" data-duration=".5s" data-delay="1s">Slider3</div>
    </div>
  </div>
</div>

<script src="swiper.min.js"></script>
<script src="swiper-animation.min.js"></script>
<script>
  // use swiper 3.x
  var swiperAnimation = new SwiperAnimation();
  var mySwiper3 = new Swiper('.swiper-container', {
    onInit: function(swiper) {
      swiperAnimation.init(swiper).animate();
    },
    onSlideChangeEnd: function(swiper) {
      swiperAnimation.init(swiper).animate();
    }
  });

  // use swiper 4+
  var swiperAnimation = new SwiperAnimation();
  var mySwiper4 = new Swiper('.swiper-container', {
    on: {
      init: function () {
        swiperAnimation.init(this).animate();
      },
      slideChange: function () {
        swiperAnimation.init(this).animate();
      }
    }
  });
</script>

CDN

jsdelivr

To use via a CDN include this in your HTML:

<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/swiper-animation@6/dist/swiper-animation.umd.min.js"></script>

Earlier Version

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].