JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 91
  • Score
    100M100P100Q75080F
  • License MIT

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: draggable resizable gesturable dropzone.
  • event handlers: onDragStart onDragMove onDragInertiaStart onDragEnd onResizeStart onResizeMove onResizeInertiaStart onResizeEnd onGestureStart onGestureMove onGestureEnd onDropActivate onDropdEactivate onDragEnter onDragLeave onDropMove onDrop onDown onMove onUp onCancel onTap onDoubleTap onHold.

api details, visit interactjs' docs

Installation

npm install reactablejs --save

Usage

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) 

Example