Draft. Ported from the shadcn-vue Empty and restyled with Beehexa tokens. Not yet approved; the API may still change.
An empty state is what a page, panel or table shows when there is nothing in it yet. It says why it is empty and what to do next.
When to use
- First use: nothing has been added, such as no connections yet. Give the one action that starts it.
- No results: a search or filter found nothing. Say what was searched and how to widen it.
- Cleared: everything is done, such as no failed syncs. Say so plainly.
When not to use
- While content is loading. Show a skeleton or a spinner; “No orders” before the data arrives is wrong.
- For an error. If loading failed, say what failed and how to retry, in a message.
- For an empty row in an otherwise filled table. Use
TableEmpty(Table).
Content
- Title: what is empty, in a few words: “No connections yet”, “No customers match “Lotus”“.
- Description: one sentence that says why, or what to do.
- Action: one primary button for first use; an outline button such as “Clear search” for no results. Not more than two.
- Icon: one Lucide icon that fits the subject, decorative. Leave it out rather than use a generic one.
Parts
| Part | Holds |
|---|---|
Empty |
The whole state. Add class="border-(length:--bh-border-width-default)" for a dashed edge |
EmptyHeader |
EmptyMedia, EmptyTitle, EmptyDescription |
EmptyMedia |
An icon at 32 px (default) or a 16 px icon on a tile (icon) |
EmptyContent |
The actions |
Tokens
| Part | Tokens |
|---|---|
| Space | space.500 around it (Spacing: around empty states), space.200 between parts, space.100 inside the header |
| Edge | radius.card, dashed color.border.bold when a width is set |
| Icon | size.icon.empty (32 px) in color.icon.subtle; tile size.icon.empty, color.background.neutral, radius.control |
| Title | font.heading.small, color.text |
| Description | font.body.default, color.text.subtle; links color.link, underlined |