Empty state
The three-part empty state — what is missing, why, and the single most likely next action.
Live preview
Source
The exact file rendered in the preview above.
components/demos/empty-state.tsx
components/ui/empty-state.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
An empty state is product writing more than UI. The component enforces the three parts that make one useful, so a zero-state can never ship as just a grey box saying "No data".
- Distinguish "nothing yet" from "nothing matched" — they need different copy and different actions.
- Echo the failed query back to the user so they can see the typo.
- Bare appearance avoids a box-inside-a-box when the empty state already sits in a panel.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Panel — dashed enclosure
- Bare — inside an existing panel
- Three sizes
- With primary and secondary actions
Accessibility
- Heading
- The title is a paragraph, not a heading, so it never disrupts the page outline. Add a real heading when the empty state owns a section.
- Icon
- Decorative and hidden; the title carries the message.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsTable
A semantic table with two responsive strategies, a focusable scroll region and a built-in empty state.
intermediateFeatured5 variantsSearch field
A search input with a keyboard-reachable clear button and an optional shortcut hint.
starter4 variantsNo search results
The failed-query state, with the query echoed and the active filters shown.
starterFeatured3 variants