Online Demo(Recommend to use mobile)
Vuescroll is a customizable, multi-mode driven scrollbar plugin based on Vue.js - vuescrolljs.yvescoding.org
You can use it on PC or mobile by changing its mode.
-
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 change of scrolled content.
-
Support typescript.
-
Support SSR(Server-Side Rendering).
-
Support pull to refresh and push to load, for detail, you can checkout this demo, and this demo of SSR version.
-
Support snapping. Snapping means you can scroll same given distance in options at each timem. You can use it to make a time-picker.
-
Support paging. Paging means you can scroll a distance of container at each time. You can use it to make such a Carousel.
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>
Detailed changes for each release are documented in the release notes.
Please check out CONTRIBUTING.
For bug report or feature request, you can raise an issue or twitter @wangyi70991
MIT