Lightweight react desktop/mobile swiper


Keywords
react, swiper, swipe, slider, touch, ios, react-swiper, mobile, gallery, animation
License
MIT
Install
npm install @antonkolesnik/swiper@1.0.0-beta.20

Documentation

Swiper

Lightweight react desktop/mobile swiper

Demo

See demo HERE

Installation

Install with NPM

npm install @antonkolesnik/swiper

Install with Yarn

yarn add @antonkolesnik/swiper

Stylesheets

import '@antonkolesnik/swiper/lib/styles.css';

Props:

  • className: CSS class name to style the swiper
  • withPagination (true by default): Enable/disable pagination
  • onSwipeStart
  • onSwipe
  • onSwipeEnd
  • onPaginationChange

Usage example

import Swiper from '@antonkolesnik/swiper';
import '@antonkolesnik/swiper/lib/styles.css';

const Demo = () => (
  <div style={{ width: '600px' }}>
    <Swiper className="custom" withPagination>
      <div style={{ background: 'black', color: 'white' }}>Slide 1</div>
      <img src="img.jpg" />
    </Swiper>
  </div>
);