A button which appears in the bottom right corner of the screen when the "threshold" amount of pixel got scrolled. A click on the button scrolls the page back to the top.

This button does not contain any accessibility features what so ever. A screen reader will not announce this component and the button is not part of the keyboard tab order. Any features needs to be added.

Uses the following css variables:

  • --hylo-scroll-top-background background color (default: black)
  • --hylo-scroll-top-hover-background background color on mouse houver (default: black)
  • --hylo-scroll-top-color stroke color (default: white)
  • --hylo-scroll-top-hover-color stroke color on mouse hover (default: white)
  • --hylo-scroll-top-stroke stroke thickness (default: 2px)

Properties

Properties

threshold: number = 500

How many pixel need to be scrolled to have the component appear.

Generated using TypeDoc