Skip to main content Red Hat Design System logo Contribute on Github v2.0.0 Home
About About the design systemHow we buildRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridPersonalization patternsSpacingTypography
Tokens Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries
Elements All elements Accordion Alert Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Call to action Card Code block Dialog Footer Health index Icon Navigation (primary)Planned Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Patterns All patternsAnnouncementCardDisclosureFilterFormLinkLink with iconLogo wallSearch barSkip navigationSticky bannerSticky cardTabsTileVideo thumbnail
Accessibility FundamentalsContentDesignDevelopmentContributorsQa and testingAssistive technologiesResources
Design/code status Release notes Get support

Back to top

Overview Style Guidelines Code Demos Accessibility
  1. Style
  2. Theme
  3. Space
  4. Interaction states
  1. Style
  2. Theme
  3. Space
  4. Interaction states

Style

A back to top is a pill-shaped button that is anchored to the bottom right corner of a page.

Anatomy

Back to top button with numerical annotations
  1. Container
  2. Text
  3. Icon

Theme

The back to top button looks the same in light and dark themes.

Back to top button with a blue background and white text against a white surface color Back to top buttons that have a blue background and white text against a black surface color

Space

A back to top button has 4px of padding on the left and right, 8px of padding on the top and bottom, and a 4px gap between text and icon. The amount of space remains the same on all breakpoints.

Back to top button with block padding of 4px, inline padding of 8px, and a 4px gap between text and icon

Interaction states

Interaction states are visual representations used to communicate the status of an element or pattern.

Hover

The background color of the button turns to a darker blue on hover. It also has a white border adjacent to the button and a dark blue outline adjacent to the border. This ensures contrast against all surface colors.

Back to top button with a dark blue background when a cursor hovers over it

Focus

Helpful tip

The Focus state has the same styles as the Hover state.

A back to top button with a dark blue background and a blue focus ring around it

Active

Helpful tip

The Active state has the same styles as the Hover state.

A back to top button with a dark blue background and a blue focus ring around it

Other libraries

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

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