Clinia UI

Loading

Which indicator to show while something loads, and when to show none at all.

Loading feedback tells a user the app is currently working for them. The right choice of indicator depends on what's loading and for how long.

How to choose a loading indicator

SituationUse
Content whose shape is knownSkeleton, shaped like the content
An action started from a buttonSpinner inside the Button, which is disabled with a present-tense label
A job with a known lengthProgress with the percentage beside it
Work that outlasts the screenSonner with toast.promise, so the user keeps working

The expected completion time and the situation set the choice.

Example

Do shape the skeleton like the content it replaces.
Don't swap a whole section for a spinner.

Do and Don't

Do keep a label that says what's in progress.
Don't replace the button label with a spinner.

Do

  • If an action is expected to complete in under about 300ms, don't show any loading indicator.
  • Shape the skeleton like the content it replaces, so nothing jumps when the content arrives.
  • Keep a label in the button that says what's in progress, such as Saving or Ingesting.
  • Let the words carry the state, such as Saving or Uploading.

Note: under reduced motion, spinners stop turning and skeletons stop pulsing (see Motion).

Don't

  • Let an animation be the only sign that something is happening.
  • Replace a button's label with a spinner.

Where it should not be used

  • There's nothing to load: show an Empty state. See Empty states.
  • Something failed: show an Alert that says what to fix.