Package Exports
- reactablejs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reactablejs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
reactablejs = reactjs + interactjs
A react high-order component for interactjs.
Current supported features:
- drag
- resize
- drop
- multi-touch
Current supported props:
- options:
draggableresizablegesturabledropzone. - event handlers:
onDragStartonDragMoveonDragInertiaStartonDragEndonResizeStartonResizeMoveonResizeInertiaStartonResizeEndonGestureStartonGestureMoveonGestureEndonDropActivateonDropdEactivateonDragEnteronDragLeaveonDropMoveonDroponDownonMoveonUponCancelonTaponDoubleTaponHold.
api details, visit interactjs' docs
Installation
npm install reactablejs --saveUsage
import React from 'react'
import reactable from 'reactablejs'
const MyComponent = (props) => {
return <div ref={props.getRef}>
hello, world!
</div>
}
// MyComponent will get getRef in props, put getRef to the element you want interact, then you can use all options and event handlers on Reactable
const Reactable = reactable(MyComponent)