Integrated ResearchPicasso
Components

Loader

Indeterminate wait indicators: spinner for in-console waits, fuse for brand moments, pulse for Iris thinking.

{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}

Indeterminate wait indicators: spinner for in-console waits, fuse for brand moments, pulse for Iris thinking.

Import

import { Loader } from "@ir/ui";

Props

Takes the props of the element it renders, and nothing of its own — styling is the component's business, not the caller's.

Do and don't

Use Skeleton when the shape is known; keep the spinner for small regions with nothing to stand in for.

Don't — Put a spinner where you already know the layout that is coming.

A skeleton promises the layout and stops the page jumping. A spinner only says 'wait'.

Keep Fuse for app boot, the widget's first run and empty states — one on screen, at least 56px.

Don't — Use Fuse for a table refresh or anywhere inside the console.

It is slow, large and carries IR red, which means critical everywhere else in Clarion. It also repaints every frame.

Name the work: "Bringing your fleet online", "Iris is thinking".

Don't — Label it "Loading".

The label is the only thing a screen reader hears, and 'Loading' tells the person nothing.

Pass label={null} so it is announced once.

Don't — Leave the label on when visible text beside the loader says the same thing.

Hearing the same sentence twice reads as a bug.

Rely on the show delay (Pulse waits 400ms by default; set delay for others).

Don't — Show a loader for a wait that usually ends in 300ms.

A loader that appears and vanishes reads as a glitch, not as work.

Use the button's loading state.

Don't — Put a Loader next to a button while it saves.

The action and its progress belong in the same place.

Accessibility

  • A loader with text is role="status" with aria-live="polite" and the text in an sr-only span. A loader without text is aria-hidden, because an unlabelled live region announces an interruption that says nothing.
  • Every animation stops under prefers-reduced-motion — but substitutes rather than deletes. Travel becomes a fade, because a spinner that simply stops looks broken rather than busy.
  • The SVG filter that gives Fuse its gooey merge is aria-hidden and its id is generated with useId, so two loaders on one page cannot collide.

Where it is drawn

Loader (Variant = Spinner · Fuse · Pulse)

Open in Storybook

On this page