https://github.com/appleple/scroll-up
This library is for a fixed scroll to top button.
https://github.com/appleple/scroll-up
es6 npm vanilla
Last synced: about 2 months ago
JSON representation
This library is for a fixed scroll to top button.
- Host: GitHub
- URL: https://github.com/appleple/scroll-up
- Owner: appleple
- License: mit
- Created: 2018-07-10T10:29:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-16T04:50:19.000Z (almost 8 years ago)
- Last Synced: 2025-01-09T11:55:36.064Z (over 1 year ago)
- Topics: es6, npm, vanilla
- Language: JavaScript
- Size: 668 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ScrollUp
This library is for a fixed scroll to top button.
It will be hidden when on top and scrolls up the window smoothly when it's clicked.
## Installation
### via npm
```sh
npm install @appleple/scroll-up --save
```
### via yarn
```sh
yarn add @appleple/scroll-up
```
### via cdn
```html
```
## Usage
import the js with babel and Browserify/Webpack
```js
import ScrollUp from '@appleple/scroll-up';
new ScrollUp('.js-scroll-up');
```