Skip to main content Home
About About the Design SystemRoadmap
Get started OverviewDesignersDevelopers
Foundations OverviewColorGridIconographyInteractionsSpacingTypography
Tokens Overview Global colorbox shadowTypographyborderopacityspacelengthIconBreakpointsMedia Queries
Elements All elements Accordion Alert Announcement Audio player Avatar Back to top Badge Blockquote Breadcrumb Button Card Chip Code block Call to action Dialog Disclosure Footer Health index Icon Jump links Navigation (primary) Navigation (secondary) Pagination PopoverPlanned Progress stepsPlanned Site status Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed
Theming OverviewColor PalettesCustomizingDevelopers
Patterns All PatternsCardTabsFilterFormLinkLink with iconLogo wallSearch barSkip navigationSticky bannerSticky cardTileVideo thumbnail
Personalization All Personalization PatternsAnnouncement
Accessibility FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers
Design/code status Release notes Get support

Back to top

OverviewStyleGuidelinesCodeAccessibilityDemos
StyleColor schemeSpaceInteraction statesStyleColor schemeSpaceInteraction 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

Color scheme

The back to top button looks the same on light and dark color schemes.

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-2025 Red Hat, Inc. Deploys by Netlify