Vue drag-and-drop component based on Sortable.js
The Vue.Draggable is a Vue component (Vue.js 2.0) or directive (Vue.js 1.0) that allows drag-and-drop functionality and synchronization with view model array, based on and offering all features of Sortable.js. It supports touch devices, drag handles, auto-scrolling, drag and drop between different lists, cancellation support, and events reporting for full control. It is compatible with various UI library components like vuetify, element, or vue material, and does not have a jQuery dependency.
To install Vue.Draggable for Vue 2.0 using npm or yarn, make sure to use the correct package name, which is vuedraggable (not vue-draggable for Vue 1.0). Here is an example of installation using npm:
npm install vuedraggable
For Vue.js 2.0, you can use the draggable component in your .vue file by wrapping the draggable elements directly, using transition-group, manipulating props like value and list, and setting sortable options directly as props.
Vue.Draggable is a versatile Vue component/directive that provides drag-and-drop functionality with synchronization, offering a wide range of features from Sortable.js. It is well-suited for Vue.js 2.0 applications and can be easily integrated with existing UI libraries. With its comprehensive feature set and compatibility with touch devices and transition groups, Vue.Draggable offers a robust solution for implementing drag-and-drop interactions in Vue.js applications.