Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 512 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 512 Bytes

react-touchable-component

Touchable / draggable react component with an 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: `translate3d(${x}px, ${y}px, 0)`}}>
          Yo, Im moving around
        </div>
      )}
    </Touchable>
  )
}

License

MIT © Jack Hanford