Make your components scroll on mouse drag in Nuxt js

import Vue from 'vue';import VueDragscroll from 'vue-dragscroll';Vue.use(VueDragscroll);
Vue.component('VueDragscroll', VueDragscroll);
plugins: [  {src: '~/plugins/drag-scroll', ssr:   false  }],
<div v-dragscroll>// scrollable data</div>
import Vue from 'vue'import VueDragscroll from 'vue-dragscroll'Vue.use(VueDragscroll)(Or) Install for a single componentimport { dragscroll } from 'vue-dragscroll'export default {  directives: {  dragscroll  }}
npm install vue-dragscroll
import { createApp } from 'vue'import { dragscrollNext } from "vue-dragscroll";import App from './App.vue'
const app = createApp(App);app.directive('dragscroll', dragscrollNext);app.mount('#app')
<div v-dragscroll> ... <div>   <!-- For more control --><div v-dragscroll="true"> ... <div>
<div v-dragscroll:nochilddrag> ... <div>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Umesh(ewumesh)

Umesh(ewumesh)

738 Followers

Web Design || Development || Content Creator || Editor || Writer || Ewumesh || Nepal || Australia || USA