Skip to content

Spinner

Edit on GitHub

An animated, indeterminate loading indicator that shows something is in progress, without conveying how much progress has been made or how long it will take.

@volvo-cars/css v2.5.1

Apply the spinner class to a labelled native <progress> element. The indicator inherits currentColor.

Show codeHide code
<progress class="spinner" aria-label="Loading"></progress>

Control the size with width utility classes. The border thickness scales proportionally.

ClassSize
w-1616 px
w-2424 px
w-3232 px
w-4040 px
w-4848 px
.40 px (default)
  • Always add aria-label (e.g. "Loading") so screen readers announce the purpose
  • Set aria-busy="true" on the container that is loading content
  • Use aria-live="polite" regions to announce when loading completes
<div aria-busy="true" aria-label="Loading results">
<progress class="spinner" aria-label="Loading"></progress>
</div>
ClassDescription
spinnerAnimated circular progress indicator

See Sizes above for the width utility classes. The spinner respects prefers-reduced-motion through the CSS animation system.