On this page

InstallationAnatomyIn an icon's placeSizeIt takes its text's colorIn a ButtonIn a badgeIn an empty panelWhat a screen reader hearsIn the dashboardAccessibilityAPI ReferenceRulesWritten downOpen questions

Loader

Work in progress with no known end: dots that rise and drop in turn, in an icon's place.

1<Loader />

Installation

text
import { Loader } from "@dome-systems/ds-dashboard/components";

Anatomy

12
  1. 1 — Box. An icon's box, 14px unless size says another. It is what takes room in the line; it is outlined here only.
  2. 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.

Connected Connecting
1<span className="flex items-center gap-2 text-body-2 text-neutral-fg">2  <Check size={14} /> Connected3</span>4<span className="flex items-center gap-2 text-body-2 text-neutral-fg">5  <Loader /> Connecting6</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.

10The dots' own window: the smallest button's icon.12A 12px icon's box: a badge, a small button.14The product's icon box. What you get with nothing passed.16A 16px icon's box: a toast, a tree's row.
1<Loader size={10} />2<Loader size={12} />3<Loader />4<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.

Still working Still working Still working
1<span className="flex items-center gap-2 text-body-2 text-neutral-fg">2  <Loader /> Still working3</span>4<span className="flex items-center gap-2 text-body-2 text-neutral-fg-secondary">5  <Loader /> Still working6</span>7<span className="flex items-center gap-2 text-body-2 text-primary-fg-secondary">8  <Loader /> Still working9</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.

1<Button color="primary" emphasis="high" size="sm" loading loadingPlacement="before">Saving</Button>2<Button size="sm" loading loadingPlacement="before">Deleting</Button>3<Button color="primary" emphasis="high" size="sm" iconStart={Plus} loading>New agent</Button>4<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.

Running
1<Badge color="info">2  <Loader size={12} />3  Running4</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

1<p role="status" className="flex items-center justify-center gap-2 py-10 text-body-2 text-neutral-fg-secondary">2  <Loader aria-hidden /> Loading3</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.

says “Loading” says “Reply in progress”

Loading the conversation

1<Loader />2<Loader aria-label="Reply in progress" />3<p role="status">4  <Loader aria-hidden /> Loading the conversation5</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 “…”.

Running…

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

Running

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.

PropTypeDefaultDescription
size10 | 12 | 14 | 1614The box it sits in, in px: the icon it stands in for. The dots stay one size.
aria-labelstring"Loading"What a screen reader hears.
aria-hiddenboolean—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).

Still working
DoThe text is colored, and the Loader follows it.
Still working
Don’tA color class on the Loader itself: it no longer matches the text beside it.

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).

DoThe Loader before the word, and no “…”: the Loader already says it goes on.
Don’tThe word changed by hand and the button dimmed: nothing moves.

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).

Loading runs
DoThe Loader, then what is loading, without “…”.
Loading runs…
Don’tA sentence alone: nothing moves, so it reads as stuck.

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?

Open
Ours

A refresh button's arrow and the Loader cross over. In every other loading button the Loader takes the icon's place at once.

Other systems

Not looked up.