Note
This is a fork of Vue2-perfect-scrollbar. This is being done because there are currently mobile performance issues in perfect scrollbar that were fixed almost a year ago, but still not merged, along with 18 other PRs. In order to get a performant component quickly, I forked this with very tiny mods.
vue2-perfect-scrollbar
Vue.js minimalistic but powerful wrapper for perfect scrollbar
Why I Created it ?
Because I ❤️ to use perfect-scrollbar in my projects (🙌 utatti). But also because the current solutions on github are outdated or overcomplicated.
Why would you use it ?
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 🤘
Install
npm
npm install vue2-perfect-scrollbar
yarn
yarn add vue2-perfect-scrollbar
How to use
Global Registration
Vue
So then you can use this plugin in each component as
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Global options
Install method takes additional parameters:
name {String}
Name of your global component.
Default: PerfectScrollbar
tag {String}
Tag which will be render as perfect scrollbar container
Default: div
options {Object}
: Options
perfect-scrollbar options.
Default: {}
Local Registration
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Props
tag {String}
Tag which will be render as perfect scrollbar container
Default: div
options {Object}
: Options
perfect-scrollbar options.
Events
You can listen on every event which offer you perfect-scrollbar. Read more
DEMO
https://mercs600.github.io/vue2-perfect-scrollbar/. You can also fork example from codesandbox
Cookbook
Soon