Skip to content

Spinner

Stable

A small spinning ring that shows something is loading.

Also known as loader, loading indicator, progress circle, activity indicator

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Sizes

Four sizes, from small to large.

When to use it

A small spinning ring for a short wait when you cannot show what is coming. It is marked as a status, so screen readers can find what is loading.

Use it for

  • A short wait inside a button, like Saving.
  • A row or small area that is loading and has no known shape.
  • Next to status text for a step that takes a while.

Not for

Do and avoid

Loading invoices
Do. One spinner for the whole list says the area is loading.
March invoice
April invoice
May invoice
Avoid. A spinner on every row looks busy and tells people nothing more.

Do

  • Use it for waits of a second or more when nothing better fits.
  • Give it a specific label like "Saving" when more than one can be on screen.
  • Add visible text when the wait belongs to a button or a row.
  • Match its size to the text beside it.

Avoid

  • Do not use a Spinner when a Skeleton could show the shape of the content.
  • Do not use it while the assistant writes a reply. Use TypingIndicator before the reply starts and ShimmerText for status text.
  • Do not show many spinners in one list. Show one for the whole area.
  • Do not make it lime or amber.

On a phone

  • Spinner is a fixed pixel size and looks the same on a phone.
  • It is not tappable, so give people another way to cancel a long wait.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started