0.1.4 • Published 7 years ago

react-swipe-card v0.1.4

Weekly downloads
106
License
MIT
Repository
github
Last release
7 years ago

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:

  • className: string
  • onEnd: function
  • alertRight: component
  • alertLeft: component
  • alertTop: component
  • alertBottom: component

Card

Props:

  • onSwipeLeft: function
  • onSwipeRight: function
  • onSwipeTop: function
  • onSwipeBottom: function

License

MIT License

0.1.4

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago