Feedback
EmptyState
Stands in for a list or table with nothing to show yet, with the reason and the next step.
- Experimental
- No keyboard interaction
- Screen reader not tested yet
Playground
Change the props. The controls come from the documented props.
No users yet
Invite people by email. They get access once they accept.
<EmptyState title="No users yet" action={<Button>Invite user</Button>}>
Invite people by email. They get access once they accept.
</EmptyState>Usage
When to use
Use an empty state wherever a list, table or result has nothing to show: nothing has been created yet, a filter hides everything, or not enough data has come in.
When not to use
- For errors: use InlineMessage or Banner with the danger tone.
- For a loading state: show the loading state of the action that fetches the data.
How it works
A dashed outline marks the slot where content will appear. The title is a real heading, so the empty slot is findable by heading navigation; pick its level with as. An optional action offers the next step.
Content guidelines
The title says plainly what is empty: “No users yet”, “No cases match ‘Insurance’”. The text gives the reason and what happens next. The action matches the reason: create the first item, clear the filter, or no action at all while data is still coming in.
Do and don’t
Do
- Distinguish “nothing yet” from “no results for this filter” and offer the matching action.
Don’t
- Don't show an empty table with only headers; replace it with EmptyState.
Anatomy
The parts of the component and what each one does, as in the playground above.
- containerDashed border in border.control: a slot waiting for content.
- titleHeading in the body-strong role.
- bodySmall text in text.secondary.
- actionsOne button.
Examples
Type-checked, and the same code goes into the AI manifest. Import: import { EmptyState } from "@/ds";
Nothing yet
No users yet
Invite people by email. They get access once they accept.
No results
No cases match this filter
Try another industry or clear the filter.
Props
Checked against the component's TypeScript type on every build.
| Name | Type | Default | Description |
|---|---|---|---|
| title (required) | string | – | What is empty, said plainly. |
| children | ReactNode | – | Why it is empty and what happens next. |
| action | ReactNode | – | The next step, usually one Button. |
| as | "h2" | "h3" | "h4" | "h3" | Heading level that fits the page outline. |
Tokens used
Derived from the utility classes in the component's source. Copy a class with one click.
| Token | Tier | Value | Utility |
|---|---|---|---|
| card.radius | component | 16px | |
| border.control | semantic | #8A8578 | |
| spacing.2 | semantic | 8px | |
| spacing.3 | semantic | 12px | |
| spacing.6 | semantic | 24px | |
| spacing.8 | semantic | 32px | |
| text.secondary | semantic | #555555 | |
| type.small.size | semantic | 14px |
Accessibility
What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not applicable |
| Screen reader | Manual | Not tested yet |
Semantics and focus
- The title is a real heading, so the empty slot is findable by heading navigation.