Live demo
Demo source
Use a loader while people wait for something they asked for, such as data that
is loading or a file that is being prepared. Don't show one for actions that
finish almost at once: a loader that flickers draws more attention than the
delay. For a loading button, use the button's loading property instead.
Anatomy
An orange loader ring with two callouts: 1 marks the pale outer ring, and 2 the darker arc that rotates. The animation is paused to keep the callouts attached.
- Ring is the static track behind the arc.
- Arc rotates continuously. The loader doesn't show progress or a percentage.
Size and colour
size runs from xs to xl (default md). Match the loader to the area it
stands for: xs beside a line of text, lg or xl in place of a panel.
The design's primary colour maps to color="brand", using Spark or Ocean's
brand colours. color="white" is for dark or branded surfaces. Without
color, the loader takes the current text colour.
Motion
The design illustrates four positions in the animation cycle. These are frames of the same continuous rotation, not four selectable component states. The loader communicates ongoing work without a completion percentage; use a progress bar when the amount completed is known.
Accessibility
The design overview describes ARIA support, but the current native loader has
no role or accessible name, and it keeps spinning when people ask for reduced
motion. Always pair it with visible text, such as "Loading
readings…", in a role="status" region, so that everyone knows what is
happening and when it ends.