https://github.com/mierenmanz/simplebar-vue
https://github.com/mierenmanz/simplebar-vue
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mierenmanz/simplebar-vue
- Owner: MierenManz
- Created: 2022-09-15T07:37:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-15T08:43:07.000Z (over 2 years ago)
- Last Synced: 2025-02-15T19:19:52.231Z (4 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
# THIS PACKAGE IS NOT MINE!!!
It is copied from [Simplebar-vue](https://github.com/Grsmto/simplebar/tree/master/packages/simplebar-vue) and modified to work with vue 3.# SimplebarVue
### Installation
**- Via npm**
`npm install simplebar-vue --save`**- Via Yarn**
`yarn add simplebar-vue`### Usage
Check out the [Demo project](https://github.com/Grsmto/simplebar/blob/master/examples/vue).
First, register it in your Vue app:
```js
import simplebar from 'simplebar-vue';
import 'simplebar/dist/simplebar.min.css';export default {
components: {
simplebar
}
};
```Then you can use it in your template
```js
// your content elements
```
**Don't forget to import both css and js in your project!**
### :warning: Warning!
SimpleBar is **not intended to be used on the `body` element!** I don't recommend wrapping your entire web page inside a custom scroll as it will often badly affect the user experience (slower scroll performance compared to the native body scroll, no native scroll behaviours like click on track, etc.). Do it at your own risk! SimpleBar is meant to improve the experience of **internal web page scrolling**; such as a chat box or a small scrolling area. **Please read the [caveats](#5-caveats) section first to be aware of the limitations!**
### Options
Find the list of available options on [the core documentation](https://github.com/Grsmto/simplebar/blob/master/packages/simplebar/README.md#options).
### Troubleshooting
If you are experiencing issues when setting up SimpleBar, it is most likely because your styles are clashing with SimpleBar ones. Make sure the element you are setting SimpleBar on does not override any SimpleBar css properties! **We recommend to not style that element at all and use an inner element instead.**
### Sponsors
Thanks to BrowserStack for sponsoring open source projects and letting us test SimpleBar for free.
![]()