react-touchable-component

0.1.0 • Public • Published

react-touchable-component

Draggable react component with an insanely easy to use API


Install

$ npm install react-touchable-component --save

Usage

import Touchable from 'react-touchable-component'

..

render () {
  return (
    <Touchable>
      {({x, y}) => (
        <div style={{transform: translateY(`${yDelta}px`)}}>
          Yo, Im moving around
        </div>
      )}
    </Touchable>
  )
}

License

MIT © Jack Hanford

Package Sidebar

Install

npm i react-touchable-component

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • hanford