Skip to content

hanford/react-touchable-component

Repository files navigation

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

About

Touchable / draggable react component with an easy to use API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published