Components

Spinner

The Spinner component is an animated spinning icon used when an action is being processed.

When loading content or data, use the Skeleton component.

Usage

Spinner with color

Spinner with different size

Pass the size prop to change the spinner size to xs, sm, md, lg or xl

Spinner with empty area color

Accessibility

Use an aria-label to concisely explain the purpose of the spinner to assitive technologies, e.g. "Loading", "Submitting" or "Processing".

Best Practice

Spinners should:

  • Notify users that a request has been received and the action will soon complete.
  • Not be used to for an entire page load.

Props

NameTypeDefaultDescription
sizexl,lg,md,sm,xsmdThe size of the spinner.
thicknessstring2pxThe thickness of the spinner.
speedstring0.45sThe speed of the spinner.
labelstringLoading...An accessible label for the spinner (Useful for screen readers)
colorstringThe color of the spinner.
emptyColorstringtransparentThe color of the empty areas in the spinner.