Empty state
What a place shows when it has nothing to show: an icon, a heading, a description and up to two buttons, centered. One size, everywhere.
No agents yet
Register your first agent to start governing its access to tools and models.
<EmptyState icon={Robot} heading="No agents yet" description="Register your first agent to start governing its access to tools and models." action={{ label: "Register agent", onClick: register }}/>Installation
import { EmptyState } from "@/components/shared/empty-state";Screens import it from this file. It is the design system's component (ds/components/empty-state.tsx), unchanged. The same file has two helpers: EmptyStateCard puts the state in a card, and CenteredEmptyState centers it on a page with no card.
What it takes
Five pieces, and nothing else. The state loads no data and knows nothing about its screen. The screen's own file writes these five pieces and gives them to it. The screen also decides when to show it. There is one size.
| Piece | Prop | What to pass |
|---|---|---|
| Icon | icon | An icon. Leave it out and there is none. |
| Heading | heading | A short line of text. Required. |
| Description | description | A description, as text or elements. Leave it out and there is none. |
| Action | action | The first button: its label and what it does. |
| Secondary action | secondaryAction | The second button: its label and what it does. |
Anatomy
No agents yet
Register your first agent to start governing its access to tools and models.
- 1 — Icon. 20px, in the muted text color. Optional.
- 2 — Heading. 15px medium, in the full text color. The only piece that is required.
- 3 — Description. 13px, in the secondary text color, at most 384px wide. Optional.
- 4 — Action. The first button, primary. Optional.
- 5 — Secondary action. The second button, secondary. Optional.
Who supplies each piece
The words are typed in the screen's own file. To change them, change that file.
The Agents screen shows this well, because it has two empty states fed by two different files. They are the two cases every list has: a filter that matches nothing, and nothing yet. The screen decides in this order:
- While it is loading, the table shows placeholder rows and no state.
- With no agents and no filter or search, the page shows the “nothing yet” state and no table.
- Otherwise the page shows the table, and the table shows the “no match” state when it has no rows.
A filter that matches nothing
The list exists, and the search or the filter hides all of it. components/agents/agent-table.tsx gives three pieces to its table, and the table shows the state where its header row and its rows would be. The table keeps its white card, its bar and its filter chips. It has no footer while it is empty. So the way out is on screen: change the search or the filter.
No agents match filters
Try adjusting the filters or register a new agent.
<DataTable … search={…} emptyCard="default" emptyState={{ icon: Robot, heading: "No agents match filters", description: "Try adjusting the filters or register a new agent.", }}/>| Piece | On screen | Who supplies it |
|---|---|---|
| When | No row matches | The table: it is not loading and it has no rows. |
| The box | The table's own white card, with its bar and filter chips. No header row and no footer. | The table. The screen asks for the white card with emptyCard="default". |
| Icon | The Agents icon | agent-table.tsx, from the dashboard's icon registry (IconFor.Agents). |
| Heading | “No agents match filters” | agent-table.tsx. The same file feeds the Devices list, which says “No devices match filters”. |
| Description | “Try adjusting the filters or register a new agent.” | agent-table.tsx |
| Action | None | Nobody. The bar above the state is the way out. |
| Secondary action | None | Nobody. |
Nothing yet
The workspace has no agent, and no filter or search is on. The page's own file (app/(authenticated)/[kind]/[scopeId]/agents/page.tsx) checks for this. When it is true the page does not show the table, so there is no search and no filter. Under its header it shows PageEmptyState: one outline card that fills the rest of the page, with the state in its middle. The Register agent button moves from the header into the state, so it is on the page once. This is what the page writes:
<PageEmptyState
icon={IconFor.Agents}
heading="Looks like you don't have any agents yet"
description="Register your first agent to start governing tool calls."
action={canRegister ? { label: "Register agent", onClick: () => navRouter.push("/agents/new") } : undefined}
locked={orgLock.locked}
limit={agentLimitReached ? agentLimit : undefined}
/>PageEmptyState reads the plan and the billing lock, which the catalog does not have. So the picture below is what PageEmptyState draws when nothing blocks the button: EmptyStateCard, which is the ds EmptyState in the outline Card, filling the height the page leaves. A screen writes <EmptyStateCard … />; the catalog draws its two pieces.
Looks like you don't have any agents yet
Register your first agent to start governing tool calls.
<div className="flex h-80 w-full flex-col"> <Card variant="outline" className="min-h-0 flex-1 items-center justify-center"> <EmptyState icon={Robot} heading="Looks like you don't have any agents yet" description="Register your first agent to start governing tool calls." action={{ label: "Register agent", onClick: register }} /> </Card></div>| Piece | On screen | Who supplies it |
|---|---|---|
| When | No agent, no filter, no search | The page: it is not loading, the total is 0, and no filter or search is on. |
| The box | One outline card that fills the rest of the page | PageEmptyState, through EmptyStateCard. The page gives it its height (PageLayout fill). |
| Icon | The Agents icon | The page (IconFor.Agents). |
| Heading | “Looks like you don't have any agents yet” | The page. |
| Description | “Register your first agent to start governing tool calls.” | The page. Under a billing lock, PageEmptyState shows the lock's message in its place: one shared line (lib/org-lock.ts). At a plan limit it shows the limit's message, which the page supplies (“Agent limit reached”). The lock comes first. Neither applies to a reader who has no button. |
| Action | “Register agent” | The page, only for a reader who may register. At a plan limit PageEmptyState swaps it for the upgrade button, with the page's label (“Upgrade to register more”), where the organization can change its own plan; otherwise there is no button. Under a billing lock there is none. |
| Secondary action | None | Nobody. PageEmptyState has no second button. |
Inside a card or a panel
This is the most common way. The file that draws the card or the panel writes the state itself, with its pieces beside it, and shows it when it has nothing else to show. The assistant's panel does this in components/rules/assistant-sidebar.tsx:
<EmptyState
fill
icon={MagicWand}
heading="Assistant disabled"
description="The assistant is disabled for this workspace."
secondaryAction={canManageAssistant ? { label: "Open settings", onClick: openSettings } : undefined}
/>The least it takes
Only heading is required. With nothing else the state is one line, and it still keeps its 48px above and below.
No rulings yet
<EmptyState heading="No rulings yet" />A description
A description sits 4px under the heading and is at most 384px wide. It takes text or elements, so it can hold a code word.
No agents yet
Register one here, or run dome agents register from a terminal.
<EmptyState icon={Robot} heading="No agents yet" description={ <> Register one here, or run <InlineCode>dome agents register</InlineCode> from a terminal. </> }/>One button, or two
action is the first button and secondaryAction the second. The first is primary and the second secondary, unless one says otherwise with variant. Both are the Button at 28px, 16px under the text and 8px apart.
No agents yet
Register your first agent to start governing its access to tools and models.
<EmptyState icon={Robot} heading="No agents yet" description="Register your first agent to start governing its access to tools and models." action={{ label: "Register agent", onClick: register }} secondaryAction={{ label: "Import agents", onClick: importAgents }}/>One quiet button
When a state's only button should be the gray one, pass it as secondaryAction and leave action out. These are the audit log's words for a load that failed. The audit log shows them inside an outline card.
Couldn't load the audit log
Something went wrong loading the audit log. This is a load error, not an empty result. Try again in a moment.
<EmptyState icon={Warning} heading="Couldn't load the audit log" description="Something went wrong loading the audit log. This is a load error, not an empty result. Try again in a moment." secondaryAction={{ label: "Retry", onClick: retry }}/>A button that is a link
A button does one of three things. With onClick it runs it. With href it is a link out of the dashboard: it opens in a new tab and ends in the external-link icon. With render you give it a link, and the link is drawn to look like the button. The dashboard uses this to go to another of its pages. Here it goes to this section.
No activity chains yet
Chains appear once events share an activity id.
<EmptyState heading="No activity chains yet" description="Chains appear once events share an activity id." action={{ label: "Open the event log", render: <a href="#links" /> }} secondaryAction={{ label: "Learn about activity correlation", href: docsUrl("/reference/events/contracts#correlation") }}/>A button at work
A button that runs onClick takes loading while its work is in progress, and any button takes disabled and a tooltip. They are the Button's own props.
Couldn't load the audit log
<EmptyState icon={Warning} heading="Couldn't load the audit log" secondaryAction={{ label: "Retry", onClick: retry, loading: true }}/>It has no box of its own
The state is content only: no border and no background. What holds it supplies the box. Here the same state stands in a card, then in the outline card, then with nothing around it.
No agents yet
No agents yet
No agents yet
<div className="flex w-full flex-col gap-4"> <Card> <CardHeader> <CardTitle>Agents</CardTitle> </CardHeader> <CardContent> <EmptyState icon={Robot} heading="No agents yet" /> </CardContent> </Card> <Card variant="outline"> <EmptyState icon={Robot} heading="No agents yet" /> </Card> <EmptyState icon={Robot} heading="No agents yet" /></div>fill
With fill, the state grows to fill the box around it and sits in its middle. The box needs a height of its own, and must stack its content from top to bottom (a flex column). A not-found alone on its page uses fill with no card (CenteredEmptyState). The card here only gives the example a height you can see: 320px.
Tool not found
This connection may have been deleted or you may not have access to it.
<Card variant="outline" className="h-80 w-full"> <EmptyState fill icon={RadioTower} heading="Tool not found" description="This connection may have been deleted or you may not have access to it." /></Card>In the dashboard
Where the dashboard shows it today.
A list page with nothing in it yet
The page keeps its header and shows the state in one outline card that fills the rest of the page, with the page's create button. 14 files do this: Agents, Gateways, Triggers, Tools, Models and others.
components/shared/page-empty-state.tsx (PageEmptyState)
A table with no rows
A screen gives the state's pieces to its table, and the table shows the state. 19 files do this. Only the Agents and Devices lists use the design system's Table. The other 18 use the older table, which takes an icon, a heading, a plain-text description and one button.
ds/components/table/data-table.tsx (emptyState), fed by components/agents/agent-table.tsx; components/shared/data-table.tsx for the others
A load that failed
The same gray state with a warning icon and a secondary Retry. The audit log shows it in the outline card, as tall as the state.
components/audit/audit-table.tsx (AuditLoadError)
A not-found, alone on its page
No header and no card: the state centered on the page. 7 files do this. One is the shared detail page, so most detail pages get it.
components/shared/empty-state.tsx (CenteredEmptyState)
Inside a card or a panel
The state on what is already there, with no box added. The file that draws the card or the panel writes the state itself. More than 20 files do this.
components/rules/assistant-sidebar.tsx, components/agents/agent-topology.tsx
Accessibility
The heading is an <h3> and the description a paragraph. The icon is hidden from a screen reader.
A button that runs onClick is a <button>. One with href or render is an <a> element, so it can be opened in a new tab. That element carries the button role, so a screen reader should call it a button, not a link.
Its buttons are its only tab stops, in the order they are drawn. A state with no button has none. A loading button keeps its tab stop.
Nothing tells a screen reader that the state has appeared. When a list becomes empty, the reader hears nothing until they move to it. What a screen reader says on arrival was not tested.
It fades in over 150ms. Under reduced motion it appears at once.
API Reference
EmptyState
| Prop | Type | Default | Description |
|---|---|---|---|
heading | string | — | The line that says what is missing. Required. |
icon | EmptyStateIcon | — | Any icon that takes a class: an SDS icon, or one from the dashboard's icon registry. Drawn at 20px. |
description | ReactNode | — | A description under the heading. |
action | EmptyStateAction | — | The first button. Primary unless it says variant: "secondary". |
secondaryAction | EmptyStateAction | — | The second button. Secondary unless it says otherwise. Alone, it is the state's one quiet button. |
fill | boolean | false | The state grows to fill the box around it and sits in its middle. The box is a flex column with a height. |
className | string | — | Extra classes on the state itself. |
An action
What action and secondaryAction take. Besides its label and its look, an action has exactly one of onClick, href and render.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | The button's text. Required. |
variant | "primary" | "secondary" | — | The button's look. By default the first button is primary and the second secondary. |
onClick | () => void | — | What the button runs. |
loading | boolean | — | With onClick: the button's work is in progress. |
href | string | — | A link out of the dashboard. It opens in a new tab and ends in the external-link icon, unless iconEnd names another. |
render | ReactElement | — | A link to another page of the dashboard: the element is the link, drawn to look like the button. |
iconStart | IconComponent | — | An icon before the label. |
iconEnd | IconComponent | — | An icon after the label. |
tooltip | string | ButtonTooltip | — | The button's tooltip: its text, or its text with the tooltip's settings. |
disabled | boolean | — | The button cannot be used. |
The dashboard's wrappers
Three components in the dashboard show the state for a screen. EmptyStateCard and CenteredEmptyState take the state's own pieces and add only the box and the height. PageEmptyState takes fewer pieces (no second button) and also changes the description and the button when a plan limit or a billing lock blocks the create.
| Component | What it shows | File |
|---|---|---|
EmptyStateCard | The state in the outline card. Its fill is on by default, the opposite of the state's own: the card fills the rest of the page. With fill={false} it is as tall as the state. | components/shared/empty-state.tsx |
CenteredEmptyState | The state alone, with no card, centered on the page. | components/shared/empty-state.tsx |
PageEmptyState | EmptyStateCard for a list page with nothing yet. It takes icon, heading, a plain-text description, one action (a label and onClick), and the page's locked and limit. | components/shared/page-empty-state.tsx |
In a Table
The Table shows the state itself. A screen passes the pieces, never an <EmptyState>.
| Prop | Type | Default | Description |
|---|---|---|---|
emptyState | TableEmptyState | — | The state's pieces, without className. Shown where the header row and the rows would be, when there are no rows and the table is not loading. |
emptyCard | "default" | "outline" | "outline" | The table's card while the state is in it. outline keeps the border and drops the fill. default leaves the white card. |
emptyMessage | string | — | Not this component: one line of text in a row under the headers. |
This is the design system's Table. Most lists still use the older table (components/shared/data-table.tsx). It shows the state the same way, but takes only an icon, a heading, a plain-text description and one button. It has no secondaryAction and no emptyCard.
Measures
The state has no color or size settings of its own. Its text uses the three text colors: full, secondary and muted. Its buttons are the Button. Its spacing cannot be changed.
| What | Value |
|---|---|
| Above and below | 48px |
| At the sides | 24px |
| Icon | 20px, the muted text color |
| Icon to heading | 12px |
| Heading | 15px medium, the full text color |
| Heading to description | 4px |
| Description | 13px, the secondary text color, at most 384px wide |
| Text to buttons | 16px |
| Buttons | 28px tall, 8px apart |
| Fade in | 150ms, opacity only |
Rules
Written down
One size, everywhere
A page's own state and one inside a small card are the same size. There is no bigger one and no smaller one.
From .claude/rules/dashboard-ui.md (rule 7) and ds/components/empty-state.tsx.
An icon wherever a fitting one exists
A screen passes its own icon. A state with no fitting icon has none.
From .claude/rules/dashboard-ui.md (rule 7).
It is content only
The state has no border and no fill of its own, because it can be put anywhere. What holds it supplies the box.
From .claude/rules/dashboard-ui.md (rule 7) and ds/components/empty-state.tsx.
No gateways yet
Create one to route your agents' calls.
No gateways yet
Create one to route your agents' calls.
A way out is a button
What a reader can do next is action or secondaryAction, primary or secondary as the screen chooses. It is never a text link in the description.
From .claude/rules/dashboard-ui.md (rule 7) and ds/README.md (Empty state).
16px between the text and the buttons
16px. It is the same under a heading with no description.
From ds/README.md (Empty state) and ds/__tests__/empty-state.test.ts.
An empty list page keeps its header and shows the state in one card
The header keeps the page's name, its tabs and its documentation link. Under it, PageEmptyState shows one outline card that fills the rest of the page, with the state in its middle.
From .claude/rules/dashboard-ui.md (rule 7) and design/principles.md (Empty / Loading / Error).
A page offers its create once
While the page is empty its create button is in the state, and not also in the header.
From .claude/rules/dashboard-ui.md (rule 7) and design/principles.md (Empty / Loading / Error).
A not-found alone has no card and no button
A not-found page has no header and nothing else on it. Its state stands alone, centered, with no card and no button (CenteredEmptyState). A not-found under a page header, like a probe run under the Probes tabs, takes the card.
From design/principles.md (Empty / Loading / Error).
In a table, no match keeps the card and the bar
A filter that matches nothing is still the list: the table keeps its white card (emptyCard="default") and its bar, so the filter can be changed. Left alone, the table's card becomes the outline card while the state is in it.
From components/agents/agent-table.tsx and ds/components/table/data-table.tsx (emptyCard).
A failed load and a not-found use it too
They use the same gray state. A failed load has a secondary Retry.
From ds/README.md (Empty state).
Open questions
When does a failed load use the Empty state, and when a red error line?
OpenThe README says a failed load uses this gray state with a secondary Retry, and the audit log does. The design principles say an error is an inline red panel with the real error message, never “Something went wrong”. A card whose read failed shows a red line with Retry (ReadFailedNotice). Nothing written says which applies where.
Not looked up.
Should a small empty place show one muted line, or the full Empty state?
Open12 small places (cards, sub-lists, dialogs) show a single muted line (InlineEmpty). A comment in its file says to use it where the full state would be too heavy. Rule 7 says an empty place is the EmptyState, one size everywhere. The two disagree.
Not looked up.
Should a filter that matches nothing offer a Clear filters button?
OpenThe Agents list has no button in the state. The filter chips above it keep their own Clear, and the search field its own. The Table's own doc page adds a Clear filters button in the state. Nothing written settles it.
Not looked up.