On this page

InstallationWhat it takesAnatomyWho supplies each pieceA filter that matches nothingNothing yetInside a card or a panelThe least it takesA descriptionOne button, or twoOne quiet buttonA button that is a linkA button at workIt has no box of its ownfillIn the dashboardAccessibilityAPI ReferenceEmptyStateAn actionThe dashboard's wrappersIn a TableMeasuresRulesWritten downOpen questions

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.

1<EmptyState2  icon={Robot}3  heading="No agents yet"4  description="Register your first agent to start governing its access to tools and models."5  action={{ label: "Register agent", onClick: register }}6/>

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.

PiecePropWhat to pass
IconiconAn icon. Leave it out and there is none.
HeadingheadingA short line of text. Required.
DescriptiondescriptionA description, as text or elements. Leave it out and there is none.
ActionactionThe first button: its label and what it does.
Secondary actionsecondaryActionThe 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. 1 — Icon. 20px, in the muted text color. Optional.
  2. 2 — Heading. 15px medium, in the full text color. The only piece that is required.
  3. 3 — Description. 13px, in the secondary text color, at most 384px wide. Optional.
  4. 4 — Action. The first button, primary. Optional.
  5. 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:

  1. While it is loading, the table shows placeholder rows and no state.
  2. With no agents and no filter or search, the page shows the “nothing yet” state and no table.
  3. 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.

1<DataTable2  …3  search={…}4  emptyCard="default"5  emptyState={{6    icon: Robot,7    heading: "No agents match filters",8    description: "Try adjusting the filters or register a new agent.",9  }}10/>
PieceOn screenWho supplies it
WhenNo row matchesThe table: it is not loading and it has no rows.
The boxThe 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".
IconThe Agents iconagent-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
ActionNoneNobody. The bar above the state is the way out.
Secondary actionNoneNobody.

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.

1<div className="flex h-80 w-full flex-col">2  <Card variant="outline" className="min-h-0 flex-1 items-center justify-center">3    <EmptyState4      icon={Robot}5      heading="Looks like you don't have any agents yet"6      description="Register your first agent to start governing tool calls."7      action={{ label: "Register agent", onClick: register }}8    />9  </Card>10</div>
PieceOn screenWho supplies it
WhenNo agent, no filter, no searchThe page: it is not loading, the total is 0, and no filter or search is on.
The boxOne outline card that fills the rest of the pagePageEmptyState, through EmptyStateCard. The page gives it its height (PageLayout fill).
IconThe Agents iconThe 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 actionNoneNobody. 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

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

1<EmptyState2  icon={Robot}3  heading="No agents yet"4  description={5    <>6      Register one here, or run <InlineCode>dome agents register</InlineCode> from a terminal.7    </>8  }9/>

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.

1<EmptyState2  icon={Robot}3  heading="No agents yet"4  description="Register your first agent to start governing its access to tools and models."5  action={{ label: "Register agent", onClick: register }}6  secondaryAction={{ label: "Import agents", onClick: importAgents }}7/>

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.

1<EmptyState2  icon={Warning}3  heading="Couldn't load the audit log"4  description="Something went wrong loading the audit log. This is a load error, not an empty result. Try again in a moment."5  secondaryAction={{ label: "Retry", onClick: retry }}6/>

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.

Open the event logLearn about activity correlation
1<EmptyState2  heading="No activity chains yet"3  description="Chains appear once events share an activity id."4  action={{ label: "Open the event log", render: <a href="#links" /> }}5  secondaryAction={{ label: "Learn about activity correlation", href: docsUrl("/reference/events/contracts#correlation") }}6/>

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

1<EmptyState2  icon={Warning}3  heading="Couldn't load the audit log"4  secondaryAction={{ label: "Retry", onClick: retry, loading: true }}5/>

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.

Agents

No agents yet

No agents yet

No agents yet

1<div className="flex w-full flex-col gap-4">2  <Card>3    <CardHeader>4      <CardTitle>Agents</CardTitle>5    </CardHeader>6    <CardContent>7      <EmptyState icon={Robot} heading="No agents yet" />8    </CardContent>9  </Card>10  <Card variant="outline">11    <EmptyState icon={Robot} heading="No agents yet" />12  </Card>13  <EmptyState icon={Robot} heading="No agents yet" />14</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.

1<Card variant="outline" className="h-80 w-full">2  <EmptyState fill icon={RadioTower} heading="Tool not found" description="This connection may have been deleted or you may not have access to it." />3</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

PropTypeDefaultDescription
headingstring—The line that says what is missing. Required.
iconEmptyStateIcon—Any icon that takes a class: an SDS icon, or one from the dashboard's icon registry. Drawn at 20px.
descriptionReactNode—A description under the heading.
actionEmptyStateAction—The first button. Primary unless it says variant: "secondary".
secondaryActionEmptyStateAction—The second button. Secondary unless it says otherwise. Alone, it is the state's one quiet button.
fillbooleanfalseThe state grows to fill the box around it and sits in its middle. The box is a flex column with a height.
classNamestring—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.

PropTypeDefaultDescription
labelstring—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.
loadingboolean—With onClick: the button's work is in progress.
hrefstring—A link out of the dashboard. It opens in a new tab and ends in the external-link icon, unless iconEnd names another.
renderReactElement—A link to another page of the dashboard: the element is the link, drawn to look like the button.
iconStartIconComponent—An icon before the label.
iconEndIconComponent—An icon after the label.
tooltipstring | ButtonTooltip—The button's tooltip: its text, or its text with the tooltip's settings.
disabledboolean—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.

ComponentWhat it showsFile
EmptyStateCardThe 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
CenteredEmptyStateThe state alone, with no card, centered on the page.components/shared/empty-state.tsx
PageEmptyStateEmptyStateCard 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>.

PropTypeDefaultDescription
emptyStateTableEmptyState—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.
emptyMessagestring—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.

WhatValue
Above and below48px
At the sides24px
Icon20px, the muted text color
Icon to heading12px
Heading15px medium, the full text color
Heading to description4px
Description13px, the secondary text color, at most 384px wide
Text to buttons16px
Buttons28px tall, 8px apart
Fade in150ms, 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.

DoThe way out is a button under the sentence.

No gateways yet

Create one to route your agents' calls.

Don’tA link inside the sentence.

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?

Open
Ours

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

Other systems

Not looked up.

Should a small empty place show one muted line, or the full Empty state?

Open
Ours

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

Other systems

Not looked up.

Should a filter that matches nothing offer a Clear filters button?

Open
Ours

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

Other systems

Not looked up.

Catalog
Foundations
  • Overview
  • Components
  • Tokens
  • Token usage
  • Typography
  • Icons
Atoms
  • Avatar
  • Badge
  • Button
  • Checkbox
  • Color picker
  • Copy button
  • Icon tooltip
  • Inline code
  • Input
  • Hint
  • Kbd
  • Loader
  • Native select
  • Progress bar
  • Progress ring
  • Radio
  • Select
  • Status dot
  • Switch
  • Text link
  • Textarea
  • Tooltip
  • Truncate
Molecules
  • Accordion
  • Activity chart
  • AI elements
  • Alert
  • Button group
  • Card
  • Code block
  • Combobox trigger
  • Command
  • Content table
  • Context switcher
  • Dropdown menu
  • Empty state
  • Field
  • Field group
  • Filter chip
  • Flow
  • Heading
  • Icon picker
  • Icon flow card
  • Metric card
  • Modal
  • Modal confirmation
  • Pagination
  • Popover
  • Scroll area
  • Sidebar
  • Table
  • Tabs
  • Toggle group
LibraryPublished release