All Projects → yansern → vue-scrolly

yansern / vue-scrolly

Licence: other
Overlay scrollbar for Vue.js.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-scrolly

Overlayscrollbars
A javascript scrollbar plugin which hides native scrollbars, provides custom styleable overlay scrollbars and keeps the native functionality and feeling.
Stars: ✭ 2,054 (+8458.33%)
Mutual labels:  scrollbar, overlay-scrollbars
Vuescroll
A customizable scrollbar plugin based on vue.js for PC , mobile phone, touch screen, laptop.
Stars: ✭ 1,016 (+4133.33%)
Mutual labels:  vue-components, scrollbar
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (+800%)
Mutual labels:  vue-components, scrollbar
vue-flag-icon
a vue compoment for flag-icon-css
Stars: ✭ 64 (+166.67%)
Mutual labels:  vue-components
vue-data-table
Smart table using vue.js - sorting columns, filter by string, child rows, custom columns, custom row data
Stars: ✭ 15 (-37.5%)
Mutual labels:  vue-components
VueStudy
Vue Examples
Stars: ✭ 44 (+83.33%)
Mutual labels:  vue-components
aura-admin
Aura Admin is the Web App that helps you to mange the Tech Communities like GDGs, DSCs or any other tech communities with Aura
Stars: ✭ 58 (+141.67%)
Mutual labels:  vue-components
vue-datatables
No description or website provided.
Stars: ✭ 22 (-8.33%)
Mutual labels:  vue-components
special-vue-series-code-analyzing
「Vue生态库源码系列」,Vue、Vue-router、Vuex、Vue-cli、Vue-loader、Vue-devtools等
Stars: ✭ 15 (-37.5%)
Mutual labels:  vue-components
pop-vue
Vue components designed to look like Pop!_OS
Stars: ✭ 22 (-8.33%)
Mutual labels:  vue-components
vue-datamaps
It is a Vue port of the javascript-based DataMaps
Stars: ✭ 14 (-41.67%)
Mutual labels:  vue-components
vue-base64-file-upload
Upload files as base64 data-uris
Stars: ✭ 77 (+220.83%)
Mutual labels:  vue-components
Vuc
🎨 基于 Vuejs2 的 Canvas 组件库【服务器挂了。不在提供demo,github自带的静态网站不能发布,因为demo代码找不到了😂。】
Stars: ✭ 52 (+116.67%)
Mutual labels:  vue-components
floating-scroll
Lightweight jQuery plugin providing floating scrollbar functionality
Stars: ✭ 72 (+200%)
Mutual labels:  scrollbar
mousecase
A JavaScript utility enabling horizontal dragging on mousedown events 🖱
Stars: ✭ 35 (+45.83%)
Mutual labels:  scrollbar
vue-frame
Dynamic component for creation of interfaces with iframes
Stars: ✭ 47 (+95.83%)
Mutual labels:  vue-components
vuestic-ui
Free and Open Source UI Library for Vue 3 🤘
Stars: ✭ 1,501 (+6154.17%)
Mutual labels:  vue-components
vue-willtable
An editable table component for Vue.js 2.0
Stars: ✭ 119 (+395.83%)
Mutual labels:  vue-components
vue3-tree
A tree library for Vue 3
Stars: ✭ 41 (+70.83%)
Mutual labels:  vue-components
vuex-router
Move a Vue app's location state into the Vuex store. Allows super-easy page-based routing with built-in slide transitions.
Stars: ✭ 20 (-16.67%)
Mutual labels:  vue-components

vue-scrolly npm tag

Overlay scrollbar for Vue.js.


Check out the live demo.

Features

  • Supports vertical & horizontal scrollbars.
  • Easy scrollbar configration - everything using CSS!
  • Uses MutationObserver to update scrollbar size & position.
  • Supports min-height (default 20% of viewport) to ensure scrollbar remains draggable on very long content.
  • When user has scrolled to the beginning or the end of content, Scrolly seamlessly activates scrolling of parent body by detecting if user scrolled with greater scroll inertia.

Installation

$ npm install vue-scrolly

Using vue-scrolly

First, import vue-scrolly into your Vue component.

import { Scrolly, ScrollyViewport, ScrollyBar } from 'vue-scrolly';

export default {
  // ...
  components: {
    Scrolly,
    ScrollyViewport,
    ScrollyBar
  }
}

Then, construct your div block with overlay scrollbar using scrolly component.

<scrolly class="foo" :style="{ width: '400px', height: '300px' }">
  <scrolly-viewport>
    <!-- Your contents here -->
  </scrolly>
  <scrolly-bar axis="y"></scrolly-bar>
  <scrolly-bar axis="x"></scrolly-bar>
</scrolly>

Customizing overlay scrollbar

You can customize the appearance of the overlay scrollbar using CSS overrides.

This simple example below creates custom blue overlay scrollbar:

.scrolly.foo .scrolly-bar:before {
    background: blue;
}

For complete reference, you can look at vue-scrolly's default CSS stylesheet from the main Scrolly.vue component file.

Options

Scrolly

Property Description Type Default
parentScroll Scroll parent when user has completed scrolling to the beginning or the end of the viewport. Boolean true
passiveScroll When true, mousewheel event is attached as a non-blocking passive listener for improved scrolling performance. Disabling parentScroll will not be possible. See: https://www.chromestatus.com/feature/5745543795965952 Boolean false

ScrollyBar

Property Description Type Default
axis Displays horizontal or vertical scrollbar. String [x, y] y

Events

Event Description Parameters
scrollchange Triggers when user scrolls the viewport scrollLayout: object

License

vue-scrolly by Yan Sern licensed under the MIT+BSD. This project also uses normalizeWheel packaged by basilfx which contains codes extracted from BSD-licensed Fixed Data Table project by Facebook.

PS: I would love to know if you're using vue-scrolly. Tweet to me at @yansernio.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].