Skip to content
GitHub
Sections

Reference · Components and layout

Loading

This is a spec: descriptive guidance, not a checkable rule. It carries no forbidden and instead pair, and no jig check detector applies to it directly.

The spec

Choose by *what is unknown*, not by preference.

SituationUse
Shape of the result is knownSkeleton matching the real layout
Shape is unknownSpinner, centred in the region it will fill
Under ~200ms expectedNothing. A flash of loading is worse than a brief wait
Over ~10s, or a jobProgress with a stage label, and what happens if they leave
User-initiated, reversible, high confidenceOptimistic update with rollback on failure

Rules

  • Load into the region that will hold the result, never a full-page overlay for a partial update.
  • Skeletons match the real content's dimensions, or the layout jumps on arrival.
  • A control that triggered loading enters its own loading state (P-02) and stays the same width.
  • Never animate a skeleton faster than --duration-slow; a pulsing grid is more distracting than a static one.
  • Announce completion with aria-live when focus is elsewhere (E-35).
Kind
Spec
Section
Components and layout

Read as plain text