1.0.7 • Published 1 year ago

drag-scroll-vue3 v1.0.7

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

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
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago