@piyushimraw/react-swipe-card

0.2.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    0
  • 0.1.9
    0
  • 0.1.8
    1

Package Sidebar

Install

npm i @piyushimraw/react-swipe-card

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

34.8 kB

Total Files

19

Last publish

Collaborators

  • piyushimraw