English Version | 中文版
A powerful, customizable, multi-mode scrollbar plugin based on Vue.js - vuescrolljs.yvescoding.org
Online Demo(Recommend to use mobile)
- Support customize scrollbar, including setting rail/bar's
backgroundColor
,opacity
,and setting bar'skeepShow or not
. - Support smoothly scroll, you can set easing to get different scroll animations.
- Support detecting the size of scrolled content, you can checkout this demo.
- Support pull to refresh and push to load, for detail, you can checkout this demo, and this demo of SSR version.
- Support snap config, scroll same distance at each time, you can checkout this demo
- Support paging. You can checkout this demo
- Support typescript
- Support SSR, you can checkout this demo
In your entry file:
import Vue from 'vue';
import vuescroll from 'vuescroll';
import 'vuescroll/dist/vuescroll.css';
Vue.use(vuescroll);
import Vue from 'vue';
import vuescroll from 'vuescroll/dist/vuescroll-slide';
import 'vuescroll/dist/vuescroll.css';
Vue.use(vuescroll);
import Vue from 'vue';
import vuescroll from 'vuescroll/dist/vuescroll-native';
import 'vuescroll/dist/vuescroll.css';
Vue.use(vuescroll);
Wrap the content you need to scroll by vuescroll
<template>
<div class='your-container'>
<!-- bind your configurations -->
<vue-scroll :ops="ops">
<div class='your-content'>
</div>
</vue-scroll>
</div>
</template>
<script>
export default {
data() {
return {
ops: {
// some configs....
}
}
}
}
</script>
Separatevuescroll
into two parts :Native mode
andSlide mode
(Achieved)
Detailed changes for each release are documented in the release notes.
Please check out CONTRIBUTING.
MIT