2.0.4 • Published 1 month ago

@neodrag/vue v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Features

  • 🤏 Tiny - Only 1.77KB min+brotli.
  • 🐇 Simple - Quite simple to use, and effectively no-config required!
  • 🧙‍♀️ Elegant - Vue directive, to keep the usage simple, elegant and straightforward.
  • 🗃️ Highly customizable - Offers tons of options that you can modify to get different behavior.
  • ⚛️ Reactive - Change options passed to it on the fly, it will just work 🙂

Try it in Stackblitz

Installing

pnpm add @neodrag/vue

# npm
npm install @neodrag/vue

# yarn
yarn add @neodrag/vue

Usage

Basic usage

<script setup>
import { vDraggable } from '@neodrag/vue';
</script>

<template>
	<div v-draggable>I am draggable</div>
</template>

With options

<script setup>
import { vDraggable } from '@neodrag/vue';
</script>

<template>
	<div v-draggable="{ axis: 'x', grid: [10, 10] }">I am draggable</div>
</template>

Defining options elsewhere with typescript

<script setup lang="ts">
import { vDraggable, type DragOptions } from '@neodrag/vue';

const options: DragOptions = {
	axis: 'y',
	bounds: 'parent',
};
</script>

<template>
	<div v-draggable="options">I am draggable</div>
</template>

Read the docs

Credits

Inspired from the amazing react-draggable library, and implements a similar API, but 3x smaller.

License

MIT License © Puru Vijay

2.0.4

1 month ago

2.0.0-next.6

1 year ago

2.0.0-next.4

1 year ago

2.0.0-next.5

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.0-next.2

1 year ago

2.0.0-next.3

1 year ago

2.0.0-next.0

1 year ago

2.0.0-next.1

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

0.1.2

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago