Skip to main content Home About the Design SystemRoadmap OverviewDesignersDevelopers OverviewColorGridIconographyInteractionsSpacingTypography Overview Global colorBox shadowTypographyBorderOpacitySpaceLengthIconBreakpointsMedia queries 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 Menu dropdown Navigation link Navigation (primary) Navigation (secondary) Navigation (vertical) Pagination PopoverPlanned Progress stepper Scheme toggle Site status Skeleton Skip link Spinner Statistic Subnavigation Surface Switch Table Tabs Tag Tile Timestamp Tooltip Video embed OverviewColor PalettesCustomizingDevelopers All PatternsAccordionCall to ActionCardFilterFormLink with iconLogo wallSearch barSticky bannerSticky cardTabsTagTile All Personalization PatternsAnnouncement FundamentalsAccessibility toolsAssistive technologiesCI/CDContentContributorsDesignDevelopmentManual testingResourcesScreen readers Design/code status Release notes Get support

Spinner

OverviewStyleGuidelinesCodeAccessibilityDemos
ImportingUsageUsagerh-spinnerImportingUsageUsagerh-spinner

Importing

Add rh-spinner to your page with this import statement:

<script type="module">
  import '@rhds/elements/rh-spinner/rh-spinner.js';
</script>
Copy to Clipboard Wrap lines

To learn more about installing RHDS elements on your site using an import map read our getting started docs.

Usage

<rh-spinner></rh-spinner>

<script type="module">
  import '@rhds/elements/rh-spinner/rh-spinner.js';
</script>
Copy to Clipboard Wrap lines

Usage

Default/Large Spinner

<rh-spinner></rh-spinner>

Medium Spinner

<rh-spinner size="md"></rh-spinner>

Small Spinner

<rh-spinner size="sm"></rh-spinner>

rh-spinner

Provides an animated loading indicator for when content is being processed or fetched. A spinner should be used when loading takes fewer than ten seconds and the content structure is unknown. Authors must not use a spinner for indeterminate loading over ten seconds; use a progress bar instead. Authors should avoid omitting a text label, as screen readers rely on role="status" to announce the ARIA live region. The element is not keyboard-focusable.

Slots 1

Slot Name Summary Description
[default]

Optional text label displayed below the animated circle. Use a <p> element with a brief loading message (e.g. "Loading...").
Note: [default] unnamed slots do not have a slot="name" attribute.

Attributes 1

Attribute DOM Property Description Type Default
size size

Preset sizes for the spinner

'sm' | 'md' | 'lg'
'lg'

Methods 0

None

Events 0

None

CSS Shadow Parts 0

None

CSS Custom Properties 0

None

Design Tokens 17

Token Description Copy
--rh-space-lg

Margin between spinner circle and text label

16px spacer

Full CSS Variable Permalink to this token
--rh-font-family-body-text

Text label font family

Body text font family

Full CSS Variable Permalink to this token
--rh-font-weight-body-text-regular

Text label font weight

Regular font weight

Full CSS Variable Permalink to this token
--rh-line-height-body-text

Text label line height

Line height for body text

Full CSS Variable Permalink to this token
--rh-length-4xl

Default spinner circle diameter

64px length token

Full CSS Variable Permalink to this token
--rh-color-accent-base

Animated indicator stroke color

Full CSS Variable Permalink to this token
--rh-color-gray-10

Track stroke color in light mode

Tertiary surface (light theme)

Full CSS Variable Permalink to this token
--rh-color-gray-70

Track stroke color in dark mode

Tertiary surface (dark theme)

Full CSS Variable Permalink to this token
--rh-size-icon-06

64px icon box

Full CSS Variable Permalink to this token
--rh-length-sm

Default spinner circle stroke width

6px length token

Full CSS Variable Permalink to this token
--rh-font-size-body-text-lg

18px font size

Full CSS Variable Permalink to this token
--rh-size-icon-04

40px icon box

Full CSS Variable Permalink to this token
--rh-length-xs

4px length token

Full CSS Variable Permalink to this token
--rh-font-size-body-text-md

16px font size

Full CSS Variable Permalink to this token
--rh-size-icon-01

16px icon box

Full CSS Variable Permalink to this token
--rh-length-2xs

3px length token

Full CSS Variable Permalink to this token
--rh-font-size-body-text-sm

14px font size

Full CSS Variable Permalink to this token
© 2026 Red Hat Deploys by Netlify