Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/mrfade/vue-drag-drop-snap

A dependency-free Vue component, that allows you to drag and drop elements and snap them to specified positions like Discord
https://github.com/mrfade/vue-drag-drop-snap

dnd drag drag-and-drop drop vue vuejs

Last synced: about 2 months ago
JSON representation

A dependency-free Vue component, that allows you to drag and drop elements and snap them to specified positions like Discord

Lists

README

        

# vue-drag-drop-snap

A dependency-free Vue component, that allows you to drag and drop elements and snap them to specified positions. Inspired by [vue-drag-it-dude](https://github.com/Esvalirion/vue-drag-it-dude)

[![npm](https://badgen.net/npm/v/vue-drag-drop-snap)](https://www.npmjs.com/package/vue-drag-drop-snap)
[![npm](https://badgen.net/npm/dm/vue-drag-drop-snap)](https://www.npmjs.com/package/vue-drag-drop-snap)
[![npm](https://badgen.net/npm/dt/vue-drag-drop-snap)](https://www.npmjs.com/package/vue-drag-drop-snap)
[![npm](https://badgen.net/npm/license/vue-drag-drop-snap)](https://www.npmjs.com/package/vue-drag-drop-snap)
![vue-drag-drop-snap](https://badgen.net/bundlephobia/min/vue-drag-drop-snap)

## Install

```bash
npm install vue-drag-drop-snap

or

yarn add vue-drag-drop-snap
```

## Usage

```js
import VueDragDropSnap from 'vue-drag-drop-snap'

export default {
components: {
VueDragDropSnap
}
};
```

```html





.wrapper {
position: relative;
}

```

> Note: Don't forget to add `position: relative;` to the parent (`.wrapper`) element.

## Docs

See the full api docs and examples here: [https://mrfade.github.io/vue-drag-drop-snap/](https://mrfade.github.io/vue-drag-drop-snap/)

## License

[MIT license](LICENSE)