voronianski/react-swipe
voronianski/react-swipe has 1,648 GitHub stars and 249 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 03:18 UTC. Last push 2022-03-22.
:left_right_arrow: Swipe.js as a React component
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalreact-swipe
Brad Birdsall's Swipe.js as a React component.
Demo
Check out the demo from a mobile device (real or emulated).

Install
npm install react swipe-js-iso react-swipe --save
Usage
Examples
import React from 'react';
import ReactDOM from 'react-dom';
import ReactSwipe from 'react-swipe';
const Carousel = () => {
let reactSwipeEl;
return (
<div>
<ReactSwipe
className="carousel"
swipeOptions={{ continuous: false }}
ref={el => (reactSwipeEl = el)}
>
<div>PANE 1</div>
<div>PANE 2</div>
<div>PANE 3</div>
</ReactSwipe>
<button onClick={() => reactSwipeEl.next()}>Next</button>
<button onClick={() => reactSwipeEl.prev()}>Previous</button>
</div>
);
};
ReactDOM.render(<Carousel />, document.getElementById('app'));
Props
swipeOptions: ?Object- supports all original options from Swipe.js config. If passed object differs from the previous onereact-swipewill re-initiate underlying Swipe.js instance with fresh optionsstyle: ?Object- object with 3 keys (see defaults):container: ?Objectwrapper: ?Objectchild: ?Object
regular props as
className,idfor root component are also supportedchildCount: ?Number- use it to explicitely tellreact-swipethat it needs to re-initiate underlying Swipe.js instance. For example, by setting thechildCountprop to thelengthof the images array that you pass intoreact-swipe, re-rendering will take place when theimages.lengthdiffers from the previousrenderpass:
<ReactSwipe childCount={images.length}>{images}</ReactSwipe>
Methods
Component proxies all Swipe.js instance methods.
Playground
Configure the ReactSwipe component in a sandbox environment at CodeSandbox.
MIT Licensed
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,747 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,323 starsreact/react
The library for web and native user interfaces.
252,408 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,630 stars