drag-scroll-vue3
v1.1.2
Published
This package provide directive for drag scroll
Downloads
1,804
Maintainers
Readme
drag-scroll-vue3
This package provide directive for drag scroll
Installation
npm install drag-scroll-vue3
Basic usage
import { createApp } from "vue";
import App from "./App.vue";
import dragScroll from "drag-scroll-vue3";
const app = createApp(App);
app.directive("drag-scroll", dragScroll);
app.mount("#app");
<your-component-with-list v-drag-scroll>
<block />
<block />
<block />
<block />
<block />
</your-component-with-list>
In this case, scroll will work for all directions at a speed equal to 1
Modify speed and direction
<your-component-with-list v-drag-scroll.options="{ speed: 2, direction: 'y' }">
<block />
<block />
<block />
<block />
<block />
</your-component-with-list>
Available direction option
- all
- x
- y