react-draggable-mixin

React Draggable Mixin

Usage no npm install needed!

<script type="module">
  import reactDraggableMixin from 'https://cdn.skypack.dev/react-draggable-mixin';
</script>

README

React Draggable Mixin

Install

npm i react-draggable-mixin

API

isDragOnTouchStart

invokes onDrag when touchstart is occurred.

onDrag

invoked while dragging for both touchmove and touchend.

won't be invoked if there is no touchmove

onDrop

invoked when drag is finished

happened when touchend and at least one touchmove was triggered previously

DEMO

jsfiddle

TODO

support mouse event / drag event / and pointer event

unit tests