Skip to content

newyork-anthonyng/react-draggable-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React-Draggable (lite)

Travis Codecov npm semantic-release

A lightweight component that makes its children draggable.

Installation

$ npm install --save react-draggable-lite

Basic Usage

import Draggable from 'react-draggable-lite';

...

<Draggable
  onDragStart={() => console.log('drag start')}
  onDragging={() => console.log('dragging')}
  onDragEnd={() => console.log('drag end')}
>
  <h1>Hello World</h1>
</Draggable>

API

Property Description
onDragStart A function that is called when the Draggable element is first clicked on or touched (on mousedown or touchstart)
onDragging A function that is called when dragging the Draggable element (on mousemove or touchmove)
onDragEnd A function that is called when the dragging has stopped (on mouseend or touchend)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published