JSPM

vanilla-back-to-top-custom

7.2.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q35347F
  • License MIT

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

Package Exports

  • vanilla-back-to-top-custom
  • vanilla-back-to-top-custom/dist/vanilla-back-to-top.umd.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vanilla-back-to-top-custom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vanilla Back To Top

Live demo

Changes in This Version

  • Added ability to set custom class name via className

Original Project

Fork of vanilla-back-to-top with minor modifications.

Usage with New Parameter

Add this to <body> of your HTML:

<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

See EXAMPLES

For all options see OPTIONS

Documentation

Original Documentation

License

MIT, see LICENSE

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