Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozangulle/vue-detached-scrollbar
https://github.com/ozangulle/vue-detached-scrollbar
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ozangulle/vue-detached-scrollbar
- Owner: ozangulle
- License: mit
- Created: 2017-02-08T20:48:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-05T17:52:17.000Z (over 2 years ago)
- Last Synced: 2024-01-05T22:57:51.589Z (5 months ago)
- Language: JavaScript
- Size: 2.38 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
- Contributing: Contributing.md
- License: LICENSE.md
Lists
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue. - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vue - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (Components & Libraries / UI Utilities)
- awesome-vue - vue-detached-scrollbar ★1 - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
- awesome-vuejs - vue-detached-scrollbar - A simple scrollbar that can be detached from the container it is scrolling. (UI Utilities / Scroll)
README
# Vue Detached Scrollbar
This is a simple scrollbar that you can detach from the element that you want to scroll in. It comes with a minimal HTML structure.
Demo: https://ozangulle.github.io/vue-detached-scrollbar/
### Installation
Simply type
```sh
npm install --save vue-detached-scrollbar
```You'll need Vue.js to run it.
The components, Gallery and ScrollBar communicate with each other via scrollBus.
You'll need to import and register it as data.```javascript
import {scrollBus} from 'vue-detached-scrollbar'const app = new Vue({
data: {
scrollBus,
},
}
```Inside the components where you want to use Gallery and Scrollbar, you simply register them as components
```javascript
import {ScrollBar} from 'vue-detached-scrollbar';export default {
components: {
ScrollBar,
},
}
```You can customize the scrollbar using the css classes .scrollbar, .scrollbar-slider, and .scrollbar-wrapper. .scrollbar refers to the bar itself whereas .scrollbar-slider is the slider in it.
```javascript
import {Gallery} from 'vue-detached-scrollbar';export default {
components: {
Gallery,
},
}
```You can put whatever content you want to use between the tags . For example:
```javascript
```
It's important to keep the id 'gallery'. The package uses the id to select it.
Due to the nature of the mouse event listener, you should put a onmouseup="document.onmousemove = null" on the main body of the document.
### To-do
* Upgrade to Vue 3
### Development
Want to contribute? I can only work on this project on my free time, so any help is welcome.
Please refer to Contributing.md.
License
----MIT