alexandre-garrec / react-swipe-card

Tinder style swipe cards
https://alexandre-garrec.github.io/react-swipe-card
136 stars 79 forks source link
card react swipe

react-swipe-card

Tinder style swipe cards

npm

Usage

Install

 $ npm install react-swipe-card -save

Demo

Demo

Code

import Cards, { Card } from 'react-swipe-card'

const data = ['Alexandre', 'Thomas', 'Lucien']

const Wrapper = () => {
  return (
      <Cards onEnd={action('end')} className='master-root'>
        {data.map(item => 
          <Card 
            onSwipeLeft={action('swipe left')} 
            onSwipeRight={action('swipe right')}>
            <h2>{item}</h2>
          </Card>
        )}
      </Cards>
  )
}

Components

Cards

Props:

Card

Props:

License

MIT License