Skip to content

Loading

Loading indicators offer visual feedback during data retrieval or processing, reducing uncertainty, preventing unnecessary interactions, and enhancing perceived performance.

Usage

Loading indicators are an umbrella term for feedback patterns during ongoing operations. While loading and progress are often used interchangeably, they differ:

  • Loading covers processes involved in retrieving or preparing data, typically with unknown-duration feedback (e.g., initializing features, loading a page).
  • Progress provides measurable feedback on task advancement, typically shown as percentages or steps (e.g., exporting a file, uploading data, completing a multi-step process).

How to choose loading indicators

Loading indicators should be used based on the expected duration of the process:

  • < 1 second: No loading indicator is displayed. The action is perceived as instantaneous.
  • 1 .. 3 seconds: Use an indeterminate indicator, such as a spinners or skeletons, to show that the process is ongoing but the duration is uncertain.
  • 3 .. 10 seconds: Use a determinate indicator, like a progress bar, to inform the user about the status of the loading process.
  • > 10 seconds: Perform process at the backend and allow the user to continue working. Provide a status on the affected entity (e.g., "Scanning network…") and notify the user when the process is completed (e.g., toast notification).

When to use

  • When process that takes more than 1 second.
  • When performing actions that involve waiting for external processes (e.g., API calls).
  • When transitioning between major views or content updates.
  • When process is performed asynchronously.

Best practices

  • Avoid overuse. Only use loading indicators when delays are unavoidable.
  • Inline loading indicators should allow users to continue interacting with other areas of the interface when appropriate (e.g., when only a section is loading).
  • In situations where interactions are tied to the loading (e.g., during form submission), it’s best to disable the relevant elements temporarily.
  • Implement the process (e.g., on the backend) in a way that prevents any invalid states, even if the network is interrupted or the user refreshes the browser at any time.
  • Size indicators proportionally to their associated components and place them where users expect feedback.
  • Consider complemeting the loading indicators with a brief text for context.

Except where otherwise noted, content on this site is licensed under MIT License.