Skip to main content Red Hat Design System logo Contribute on Github v1.4.5

Back to top

Overview Style Guidelines Code Demos Accessibility

Installation

rh-back-to-top

Slots 1
Slot Name Description

Text for the back to top link

Attributes 4
DOM Property Description Type Default
visible

Flag to always show back to top button, defaults to false.

'always' | undefined | undefined
unknown
scrollableSelector

Element selector to spy on for scrolling. Not passing a selector defaults to spying on window scroll events

string | undefined
unknown
scrollDistance

Distance from the top of the scrollable element to trigger the visibility of the back to top button

number
400
href

Page fragment link to target element, must include hash ex: #top

string | undefined
unknown
Methods 0

None

Events 0

None

CSS Shadow Parts 1
Part Name Description
trigger

back to top link anchor element

CSS Custom Properties 0

None

Design Tokens 0

None

Other libraries

To learn more about our other libraries, visit the getting started page.

© 2021-2024 Red Hat, Inc. Deploys by Netlify