-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64517d9
commit 0bd842a
Showing
1 changed file
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,72 @@ | ||
# vue3-smooth-scrollbar | ||
|
||
[![Test build](https://github.com/rafalolszewski94/vue3-smooth-scrollbar/actions/workflows/test-build.yml/badge.svg)](https://github.com/rafalolszewski94/vue3-smooth-scrollbar/actions/workflows/test-build.yml) | ||
|
||
Based on [vue-smooth-scrollbar](https://github.com/BlackBP/vue-smooth-scrollbar) | ||
|
||
## Requirements | ||
- Vue 3 | ||
|
||
## Project setup | ||
## Installation | ||
|
||
NPM | ||
```bash | ||
npm install vue3-smooth-scrollbar # yarn add vue3-smooth-scrollbar | ||
``` | ||
|
||
## Usage | ||
|
||
### Custom main scrollbar | ||
|
||
**App.vue** | ||
```vue | ||
<template> | ||
<scrollbar> | ||
<!-- content --> | ||
</scrollbar> | ||
</template> | ||
<script> | ||
import Scrollbar from "vue3-smooth-scrollbar"; | ||
export default { | ||
components: { Navbar, Scrollbar }, | ||
}; | ||
</script> | ||
``` | ||
|
||
**Add to your styles** | ||
```scss | ||
body { | ||
overflow: hidden; | ||
} | ||
|
||
// Assuming you're using default mount element | ||
#app { | ||
height: 100vh; | ||
overflow: auto; | ||
} | ||
``` | ||
|
||
|
||
## Development | ||
|
||
#### Project setup | ||
``` | ||
npm run install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
#### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
#### Compiles and minifies for production | ||
``` | ||
npm run build | ||
``` | ||
|
||
### Lints and fixes files | ||
#### Lints and fixes files | ||
``` | ||
npm run lint | ||
``` |