Vue.js minimalistic but powerful wrapper for perfect scrollbar
Because I ❤️ to use perfect-scrollbar in my projects (🙌 utatti). But also because the current solutions on github are outdated or overcomplicated.
Because you want to load perfect-scrollbar to your Vue project in an easy way. But also because this plugin is updated, tested and build by rollup. So you will not find any unnecessary 💩 code in this repo. I hope 🙏.
If you have any reasonable PR you are welcome 🤘
npm install vue2-perfect-scrollbar
yarn add vue2-perfect-scrollbar
import PerfectScrollbar from 'vue2-perfect-scrollbar'
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css'
Vue.use(PerfectScrollbar)
So then you can use this plugin in each component as
<perfect-scrollbar>
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</perfect-scrollbar>
Install method takes additional parameters:
Name of your global component.
Default: PerfectScrollbar
Tag which will be render as perfect scrollbar container
Default: div
options {Object}
: Options
perfect-scrollbar options.
Default: {}
<template>
<div>
<perfect-scrollbar>
<p> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </p>
</perfect-scrollbar>
</div>
</template>
<script>
import { PerfectScrollbar } from 'vue2-perfect-scrollbar'
export default {
components: {
PerfectScrollbar
}
}
</script>
<style src="vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css"/>
Tag which will be render as perfect scrollbar container
Default: div
options {Object}
: Options
perfect-scrollbar options.
You can listen on every event which offer you perfect-scrollbar. Read more
https://mercs600.github.io/vue2-perfect-scrollbar/. You can also fork example from codesandbox
Soon