v-drag
v-drag is a supler simple, Vue.js draggable component.
Installation
npm:
yarn:
Use
Node.js env (such a .vue
components):
Browser env: coming soon.
Notes
An element with v-drag
must have position: absolute;
to be draggable.
Options
You may desire only one part of an element to be draggable
. You can achieve this by passing a string which referes to an id
as argument to v-drag
.
This will result in any area that is not <div id="header"
> not becoming draggable. One common use case is a modal, that is only draggable when the top area is clicked.