Loader
Work in progress with no known end: dots that rise and drop in turn, in an icon's place.
<Loader />Installation
import { Loader } from "@catalog-dashboard/components";Anatomy
- 1 · Box. An icon's box, 14px unless
sizesays another. It is what takes room in the line; it is outlined here only. - 2 · Dots. Three columns of two 2px dots, 2px apart, in a 10px window at the box's center. Each column rises into the window, holds and drops out, one after the other.
In an icon's place
It takes the room an icon takes, 14px, so the text beside it starts where it would after an icon and nothing moves when the wait ends.
<span className="flex items-center gap-2 text-body-2 text-neutral-fg"> <Check size={14} /> Connected</span><span className="flex items-center gap-2 text-body-2 text-neutral-fg"> <Loader /> Connecting</span>Size
size is the box the Loader sits in: the size of the icon it stands in for. The dots stay one size, on their 2px grid. The boxes are outlined here.
<Loader size={10} /><Loader size={12} /><Loader /><Loader size={16} />It takes its text's color
The Loader has no color of its own and no color prop: it is drawn in the color of the text around it.
<span className="flex items-center gap-2 text-body-2 text-neutral-fg"> <Loader /> Still working</span><span className="flex items-center gap-2 text-body-2 text-neutral-fg-secondary"> <Loader /> Still working</span><span className="flex items-center gap-2 text-body-2 text-primary-fg-secondary"> <Loader /> Still working</span>In a Button
A button does not place the Loader itself: its own loading draws it. A button that waits shows the Loader, then a word for what it is doing, without “…”: loadingPlacement="before". Where the button has an icon, the Loader takes the icon's place and its color, not the label's, and the button keeps its width. Each loading button is beside the same button at rest.
<Button color="primary" emphasis="high" size="sm" loading loadingPlacement="before">Saving</Button><Button size="sm" loading loadingPlacement="before">Deleting</Button><Button color="primary" emphasis="high" size="sm" iconStart={Plus} loading>New agent</Button><Button size="sm" iconStart={Plus} loading>New agent</Button>In a badge
A status that means work in progress draws the Loader where the badge's icon goes, at 12.
<Badge color="info"> <Loader size={12} /> Running</Badge>In an empty panel
Where a list or a pane has nothing to show yet, the Loader comes before a line of text that says what is loading, without “…”. It is not left alone in an empty panel.
Loading
<p role="status" className="flex items-center justify-center gap-2 py-10 text-body-2 text-neutral-fg-secondary"> <Loader aria-hidden /> Loading</p>What a screen reader hears
With nothing passed it says “Loading”. aria-label gives it another name. Inside something that already says it is working, a paragraph with role="status" or a loading Button, aria-hidden keeps it silent so the wait is not said twice.
Loading the conversation
<Loader /><Loader aria-label="Reply in progress" /><p role="status"> <Loader aria-hidden /> Loading the conversation</p>In the dashboard
Where the dashboard draws the Loader today: 35 places in 20 files. Most are a line of text with the Loader before it. The tables and the context picker's tree draw it themselves, inside their own components.
Not moved to the rules below yet: 98 buttons still change their word and dim, 27 sentences wait with no Loader, 10 pickers write “Loading…” where the choice goes, two refresh buttons turn their arrow, and the lines here still end with “…”.
Beside a line of text
The most common place: a sentence that says what is being done, with the Loader before it. The assistant's cards (Running…, Checking…, Opening…), a probes run, a compute setup check.
components/assistant/action-card.tsx, app/…/probes/_components/run-detail.tsx, components/compute/compute-setup-check.tsx
The assistant, working on a reply
Alone under the last message while no text is arriving. Its name for a screen reader is “Dome Assistant is responding”.
components/rules/assistant-sidebar.tsx (TypingBubble)
A pending button
Drawn by the Button's own loading, never placed by a screen. A toast of type loading draws it the same way, as its icon, at 16.
ds/components/button.tsx, components/ui/button.tsx, components/ui/toast.tsx
A run that is running
A managed agent's run: the status badge draws the Loader where the other statuses draw an icon.
components/agents/managed-runs-tab.tsx
A list that loads more
Alone and centered at the end of the assistant's lists while the next page arrives.
components/assistant/load-more-sentinel.tsx
Loading…
A panel while its list loads
The context picker and the impersonation picker: “Loading…” centered in the panel, the Loader before it and silent, since the paragraph is the status.
components/layout/context-picker-body.tsx, components/layout/impersonation-required.tsx
Accessibility
The Loader is a <span> with role="status" and the name “Loading”, as shadcn's Spinner has. With aria-hidden it has neither. A loading Button hides its Loader this way: the button itself says it is busy, and keeps its own name.
Under reduced motion nothing moves. The three columns hold one frame of the wave, a step apart, and the Loader fades between full strength and 40%, so it still reads as working.
What a screen reader says when a Loader appears and when it goes was not tested.
API Reference
Besides these, the props of a <span>. It takes no children.
| Prop | Type | Default | Description |
|---|---|---|---|
size | 10 | 12 | 14 | 16 | 14 | The box it sits in, in px: the icon it stands in for. The dots stay one size. |
aria-label | string | "Loading" | What a screen reader hears. |
aria-hidden | boolean | — | Silent: no role and no name. For a Loader inside something that already says it is working. |
Rules
Written down
A wait with no known end is the Loader
It is the product's one loader, and it has one look: there is no spinner. A wait whose end is known is a bar that fills, and content that has a shape loads as a skeleton of that shape. Only the whole page waits another way, behind the Dome mark.
From .claude/rules/dashboard-ui.md (6) and design/principles.md (Empty / Loading / Error).
Nothing to pass
<Loader /> is complete: an icon's box, the text's color, and the name “Loading”. It is modeled on shadcn's Spinner, which takes nothing either.
From ds/components/loader.tsx and ds/README.md (Loader).
The box changes, the dots do not
size is the icon it stands in for: 14 by default, 12 or 16 in place of an icon of that size, 10 for the smallest button. The dots are one size at every one.
From ds/components/loader.tsx and ds/README.md (Loader).
No color of its own
It takes the color of the text it sits in. There is no color prop, and a color class does not go on the Loader: color the text around it.
From ds/README.md (Loader).
In a button's icon place, the icon's color
A Button gives its icons their own color, and its Loader takes that color where it stands in for the icon. Over the label, with no icon, it takes the label's.
From ds/components/button.tsx and ds/README.md (Loader).
A button that waits: the Loader, then the word
The button's own loading draws it. The word says what the button is doing: Saving, Deleting, Creating.
From design/principles.md (Empty / Loading / Error) and ds/README.md (Loader).
A sentence that waits has the Loader before it
In a card, a panel or a dialog. A panel with nothing to show yet says what it is waiting for, and the Loader is not left there alone.
From design/principles.md (Empty / Loading / Error) and ds/README.md (Loader).
In a picker, where the chevron is
A picker whose list is still loading shows the Loader in its chevron's place. Not built yet: the Select has no loading state.
From design/principles.md (Empty / Loading / Error).
A refresh button: the Loader takes the arrow's place
On a click the arrow gives way to the Loader, and comes back when the refresh ends. The two cross over in the same box (250ms: a fade, a 2px blur and a scale from a quarter), so nothing beside them moves; with reduced motion they change at once.
From design/principles.md (Empty / Loading / Error).
A status that means work in progress draws it in the badge
A run's Running badge has the Loader where the other statuses have their icon.
From design/principles.md (Empty / Loading / Error).
Open questions
Does every button's icon cross over to the Loader, or only a refresh button's?
OpenA refresh button's arrow and the Loader cross over. In every other loading button the Loader takes the icon's place at once.
Not looked up.