# vue-draggable
**Repository Path**: mirrors_singod/vue-draggable
## Basic Information
- **Project Name**: vue-draggable
- **Description**: Vue Drag and Drop library without any dependency 👌
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-25
- **Last Updated**: 2026-03-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#

[](https://www.npmjs.com/package/vue-draggable)
[](https://vuejs.org/)
[](https://github.com/Vivify-Ideas/vue-draggable/issues?q=is%3Aopen+is%3Aissue)
[](https://app.buddy.works/nikolaspalevic/vue-draggable/pipelines/pipeline/169364)
[](https://www.npmjs.com/package/vue-draggable)
[](https://github.com/Vivify-Ideas/vue-draggable/blob/master/LICENSE)
## Description
Vue Drag and Drop library without any dependency.
Native HTML5 drag and drop implementation made for Vue.
[Examples 🎪](https://vivify-ideas.github.io/vue-draggable/example/)
## Installation
```
npm install vue-draggable
yarn add vue-draggable
```
## Setup
```javascript
import Vue from 'vue'
import VueDraggable from 'vue-draggable'
Vue.use(VueDraggable)
```
## Usage
In the template, use the `v-drag-and-drop` directive:
### HTML
```html
```
### Options
#### Directive `v-drag-and-drop` available options
```javascript
{
dropzoneSelector: 'ul',
draggableSelector: 'li',
handlerSelector: null,
reactivityEnabled: true,
multipleDropzonesItemsDraggingEnabled: true,
showDropzoneAreas: true,
onDrop: function(event) {},
onDragstart: function(event) {},
onDragend: function(event) {}
}
```
#### Dropzone events (added, removed, reordered)
```html
```
These three custom events have additional `ids` and `index` params.
Ids is an array of defined `data-id` attributes and `index` represents
drop intersection. For more info check out [example](https://vivify-ideas.github.io/vue-draggable/example/#working-with-reactive-data)
#### Reactivity handling and renderless component
There is available `VueDraggableGroup` component so you don't need to write your own model
manipulation logic. However, usage of this component is optional. Use only with Vue v2.6+.
You can pass to component optional `itemsKey` prop if you want to change items collection
property name. By default it's `items`.
```html
```
#### Event Params for `onDrop`, `onDragstart`, `onDragend` callbacks
```javascript
{
nativeEvent: {}, // native js event
items: [], // list of selected draggable elements
owner: null, // old dropzone element
droptarget: null // new dropzone element,
stop: () => {} // Stop D&D (available only for callbacks `onDragstart` and `onDragend`)
}
```
## TypeScript
Included TypeScript definitions.
## Browser Compatibility
Polyfills for IE9+ support are included in the repo.
If you need to support IE9 in your applications, import the polyfills:
```javascript
import 'vue-draggable/polyfills'
```
## Contributors 🎖
[
](https://github.com/nikolasp) |[
](https://github.com/tiagocsilva) |[
](https://github.com/piboistudios) |
:---:|:---:|:---:|
[nikolasp](https://github.com/nikolasp)|[tiagocsilva](https://github.com/tiagocsilva)|[piboistudios](https://github.com/piboistudios)|
---
LICENCE MIT - Created by Nikola Spalevic (nikolaspalevic@gmail.com)