Stable
Loading indicators show that something is on its way. Use a spinner for a short wait or an action in progress. Use skeleton lines when you know the shape of what is coming, such as rows of a list, so the page does not jump when it loads.
Both stop moving for people who have turned on reduced motion.
Specifications
Anatomy
Anatomy
Size and spacing
Spinner
A short wait, or an action in progress. Put a few words beside it.
Example
Example
Skeleton
Placeholder lines in the shape of the content that is coming. Mix widths so it looks like text.
Example
Example
Usage
When to use
- Spinner: waiting for a short load or a save.
- Skeleton: the first load of a list, table or card.
When not to use
- Loads that finish in under about 300ms: show nothing, to avoid a flash.
- Nothing to load: use an empty state.
Content
- Say what is loading: "Loading readings", not just "Loading".
Do and don't
Do
- Keep the layout stable while loading.
Don't
- Show a spinner for the whole screen.
Implementation
HTML
<div class="at-stack at-stack--tight">
<div class="at-inline"><span class="at-spinner" role="status" aria-label="Loading"></span> Loading readings</div>
<span class="at-skeleton at-skeleton--short"></span>
<span class="at-skeleton at-skeleton--medium"></span>
</div>Classes
| Class | What it does |
|---|---|
at-spinner | Rotating ring |
at-skeleton | Grey placeholder bar, full width |
at-skeleton--short / --medium | 40% / 70% width |
Tokens used
--at-border, --at-border-primary, --at-bg-neutral
Accessibility
- Give the spinner role="status" and a label. Animations stop when reduced motion is on.