Press "Enter" to skip to content

HTML5 Drag and Drop Implementation Made for Vue

vue-draggable library is a native HTML5 drag and drops implementation made for VueJS 2+.

drag and drop library react, best drag and drop libraries, draggable js examples, drag and drop cards javascript, interact js, draggable npm

Multiple callbacks available for useonDragstartonDroponDragend.

  • onDragend is always triggered even if item is dropped in invalid dropzone.

  • onDrop is triggered only when items are dropped in valid dropzones.

  • onDragstart is always called when D&D starts.

How to make use of it:

Install & Download:

# Yarn
$ yarn add vue-draggable

# NPM
$ npm install vue-draggable --save

Usage

<div v-drag-and-drop:options="options">
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
  </ul>
  <ul>
      <li>Item 4</li>
      <li>Item 5</li>
      <li>Item 6</li>
  </ul>
</div>
import Vue from 'vue'
import VueDraggable from 'vue-draggable'

Vue.use(VueDraggable)
import { VueDraggableDirective } from 'vue-draggable'

export default {
  directives: {
    dragAndDrop: VueDraggableDirective
  }
}

drag and drop library, vue-draggable Plugin/Github


See Demo And Download

Official Website(Vivify-Ideas): Click Here

This superior jQuery/javascript plugin is developed by Vivify-Ideas. For extra advanced usage, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.