vanilla-back-to-top-custom
Version:
Simple and tiny Back To Top button with no dependencies. Hides when on top, scrolls up smoothly when clicked. Works equally great with Vue, React, Angular and without frameworks on Jekyll, Hugo and Hexo
38 lines (27 loc) • 1.36 kB
Markdown
# Vanilla Back To Top
[Live demo](https://0x69.online/en/posts/role-htaccess/)
## Changes in This Version
- Added ability to set custom class name via `className`
## Original Project
Fork of [vanilla-back-to-top](https://github.com/vfeskov/vanilla-back-to-top) with minor modifications.
## Usage with New Parameter
Add this to `<body>` of your HTML:
```javascript
<script src="https://unpkg.com/vanilla-back-to-top-custom@7.2.2/dist/vanilla-back-to-top.min.js"></script>
<script>
addBackToTop({
diameter: 56,
backgroundColor: 'rgb(255, 82, 82)',
textColor: '#fff',
className: 'my-custom-class' // New parameter
})
</script>
```
For alternative installation see [INSTALL](https://github.com/Rianvy/vanilla-back-to-top-custom/blob/main/INSTALL.md)
See [EXAMPLES](https://github.com/Rianvy/vanilla-back-to-top-custom/blob/main/EXAMPLES.md)
For all options see [OPTIONS](https://github.com/Rianvy/vanilla-back-to-top-custom/blob/main/OPTIONS.md)
## Documentation
[Original Documentation](https://github.com/vfeskov/vanilla-back-to-top)
## License
MIT, see [LICENSE](https://github.com/Rianvy/vanilla-back-to-top-custom/blob/main/LICENSE)
Default icon from [Material Design Icons](https://material.io/icons/#ic_keyboard_arrow_up) under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), which only restricts re-selling the icon