EmptyState
Stands in for content there is none of yet.
import { EmptyState } from '@/design-system';Examples
No customers match these filters
Try a shorter search.
import { Button, EmptyState } from '@/design-system';
export default function EmptyStateBasic() {
return (
<EmptyState
title="No customers match these filters"
action={<Button variant="secondary">Clear filters</Button>}
>
Try a shorter search.
</EmptyState>
);
}How it works
- It has a dashed border. Say what will appear here, or how to bring results back.
Props
EmptyState takes only these props.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | required | A level-two heading. |
children | ReactNode | — | What happened and what to do. |
action | ReactNode | — | Usually one button. |
className | string | — | Extra classes, for spacing or width. Utility classes override the component’s own styles. |
Tokens
| Token | Default | Sets |
|---|---|---|
--state-title-size | 1rem | Title text size |
--state-radius | --radius-control | Corner radius |
--state-padding | 3.5rem 1.5rem | Padding |