Skip to content
Simple and smooth Back To Top button
JavaScript Shell
Branch: master
Clone or download
Latest commit 4199d87 Nov 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Make onClickScrollTo option accept a function, closes #6 Nov 10, 2018
examples add missing example image Nov 10, 2018
npm-scripts Make my own accurate size shield for readme Jan 12, 2018
.gitignore Make my own accurate size shield for readme Jan 12, 2018
.npmignore Add exampled to .npmignore Nov 10, 2018
EXAMPLES.md
INSTALL.md 7.2.0 Nov 10, 2018
LICENSE Fix links in readme Jan 6, 2018
OPTIONS.md Add `scrollContainer` and `ease` options, use inOutSine as default ea… Nov 10, 2018
README.md 7.2.0 Nov 10, 2018
index.js Make onClickScrollTo option accept a function, closes #6 Nov 10, 2018
package-lock.json 7.2.0 Nov 10, 2018
package.json 7.2.0 Nov 10, 2018

README.md

Vanilla Back To Top

No Dependencies File Size GitHub stars

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


Live demo

Features

How to use

Add this to <body> of your HTML:

<script src="https://unpkg.com/vanilla-back-to-top@7.2.0/dist/vanilla-back-to-top.min.js"></script>
<script>addBackToTop({
  diameter: 56,
  backgroundColor: 'rgb(255, 82, 82)',
  textColor: '#fff'
})</script>

For alternative installation see INSTALL

See EXAMPLES

For all options see OPTIONS

License

MIT, see LICENSE

Default icon from Material Design Icons under Apache License 2.0, which only restricts re-selling the icon


Support me with a star ♥

You can’t perform that action at this time.