EmptyState
Fills a card or table that has nothing to show yet, and says what to do next.
Examples
First run
One primary action, plus an optional docs link.
No servers yet
Add an MCP server and your agents can call its tools through Switchboard.
<EmptyState
icon="server"
title="No servers yet"
body="Add an MCP server and your agents can call its tools through Switchboard."
action={<>
<Button icon="plus">Add server</Button>
<Link href="/docs/servers" external>Read the guide</Link>
</>}
/>Small, waiting
size="sm" for a panel inside a page.
Waiting for the first request…
Calls from your agents show up here as they happen.
<EmptyState
size="sm"
icon="activity"
title="Waiting for the first request…"
body="Calls from your agents show up here as they happen."
/>Usage
import { EmptyState } from '@switchboard/ui'
{servers.length ? <ServersTable servers={servers} /> : (
<EmptyState icon="server" title="No servers yet" body="…" action={…} />
)}Props
Every component also takes mix, for css() and mixins applied after its own style.
EmptyState
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | RemixNode | – | What is missing: "No servers yet". |
| icon | IconName | 'inbox' | Shown in a 40px accent tile. |
| body | RemixNode | – | One sentence saying what to do. children also render here. |
| action | RemixNode | – | Usually one primary Button, plus an optional docs Link. |
| size | 'md' | 'sm' | 'md' | sm has less padding, for panels. |
Also accepts every <div> attribute.
Accessibility
- Title and body are plain paragraphs; the icon is decorative.
- When it replaces content after a filter, announce the change, e.g. a role="status" result count.
Guidance
Do
- Say what will appear here and how to get it.
- Offer the action that fills it.
Don’t
- Show an empty state while data is loading; use Skeleton.
- Write jokes or "Oops"; keep it plain.