Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/james2doyle/vue-drag-and-drop
A for Vue.js directive for providing drag and drop capabilities to elements and data
https://github.com/james2doyle/vue-drag-and-drop
drag drop vuejs
Last synced: about 2 months ago
JSON representation
A for Vue.js directive for providing drag and drop capabilities to elements and data
- Host: GitHub
- URL: https://github.com/james2doyle/vue-drag-and-drop
- Owner: james2doyle
- License: mit
- Archived: true
- Created: 2015-12-10T05:24:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T02:27:15.000Z (over 6 years ago)
- Last Synced: 2024-07-12T04:08:18.232Z (3 months ago)
- Topics: drag, drop, vuejs
- Language: JavaScript
- Size: 43 KB
- Stars: 387
- Watchers: 18
- Forks: 71
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-drag-and-drop
A directive for providing drag and drop capabilities to elements and data.
### Install
Available through `npm install vue-drag-and-drop` or include as an inline script, like in `example.html`.
### Mobile Support
This library simply wraps the native drag and drop in html5. There is no support, and probably never will be any, for native "drag and drop" on mobile. See this [chart](http://caniuse.com/#feat=dragndrop).
The reason for this is that touch devices already have the necessary events (touch events) to implement drag and drop without need the additional apis that the desktop drag and drop has.
If you need a cross-platform solution, you should check out [this awesome library called pep!](http://pep.briangonzalez.org/).
### Demo
![demo gif](http://cl.ly/2B3j0g2K412y/Screen%20Recording%202015-12-09%20at%2009.23%20PM.gif)
![demo gif 2](http://cl.ly/3v2V3w1n3y2D/Screen%20Recording%202015-12-10%20at%2002.36%20PM.gif)You can load up the `example.html` file here to test the directive.
### Usage
Here is how you might typically use this directive:
```html
```
This directive assumes you are using it *inside* of some sort of list of elements.
You can see a `Vue` instance in `example.html` if you want more details.