Loader

Spinner

Add role="status" and an aria-label that says what is loading.

Spinner sizes: xs, sm, default and lg

Spinner in a button

A spinner in a button is decorative. Add aria-hidden="true" and let the button text describe the state.

Spinner beside text

Processing payment…

Spinner while a card's content loads

Add aria-busy="true" to the loading region. If it holds only a spinner, the spinner is centred in a box at least 128px tall.

Sales over time

Attributes

Attribute / element Values Description
.loader 16px spinner, 2px stroke in currentColor on a faint 20% track. Still spins (slower) with reduced motion.
data-size xs, sm, lg (omit = 16px) xs 12px (in buttons), sm 14px, lg 24px
role status On a standalone spinner, with an aria-label that names what is loading.
aria-label Text The name screen readers announce, e.g. "Loading sales".
aria-hidden true In a button or next to text that already states the status.
[aria-busy="true"] true On the loading container. If it holds only a .loader, it is centred, at least 128px tall and muted. Remove it once the content arrives.