Style

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

Anatomy

A 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.

A 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.

A 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
© 2021-2024 Red Hat, Inc. Deploys by Netlify