Revue Draggable
A Customizable Draggable Component For Vue 2 And Vue 3.
Supports Vue 2 and Vue 3! Comes with a battery batteries included component / directive / composable or for users who want more control a simple abstraction over drag events with the core, wich is also available as a component / directive / composable.
Based on React Draggable.
? Setup
For Vue2 add the composition-api to your dependencies.
Using the components
Webpack (Vue2)
Nuxt
? Registering Draggable
? Quickstart
The easiest way to make your elements draggable is by using the DraggableDirective which will handle everything for you
with no configuration necessary.
Or use the component wrapper.
(In Vue2 make sure to include the full-build, runtime-build only works for Vue3.)
Check the example file for more in-detail examples like dropping elements, setting boundaries or syncing states.
? Development
This project uses Vite for development and Rollup to create a distribution.
??♂️ Tests
Testing is done with Cypress.
You can find the specs in the cypress directory;