1.1.3 • Published 4 years ago

dragginit v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

dragginit

Simple react component to allow drag and drop based on the html drag and drop

NPM JavaScript Style Guide

Install

npm install --save dragginit

Usage

import { Draggable, Droppable } from 'dragginit'

Basic usage

<Draggable onDrag={handler}>
  <div>I can now be moved around!</div>
</Draggable>

<Droppable onDrop={handler}>
  <div>I accept draggable items</div>
</Droppable>

Enable Droppable components to drag

<Droppable onDrop={dropHandler} canDrop onDrag={dragHandler}>
  <div>I accept draggable items</div>
</Droppable>

Drag a custom src image, by default draggale components dont drag and image.

<Draggable src="/path/to/basic/imgurl">
  <div>I can now be moved around!</div>
</Draggable>

Edit Draggable and Droppable Styles.

<Droppable styles={border: '1px solid red'}>
  <div>I can dropped and you can style me how you want!</div>
</Droppable>

<Draggable styles={border: '1px solid red'}>
  <div>I can now be moved around, and you can style me how you want!</div>
</Draggable>

License

MIT © Shipyar

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago