# EmptyState

The empty case of a list or a search: what is missing, why, and one way out.

Group: Status and waiting. Code: `components/software/empty-state.tsx`. From the old system: EmptyState in @id-identity-as/ui/data. Live: https://design.id-hub.dk/software/empty-state

```tsx
import { EmptyState } from '@/components/software/empty-state';

<EmptyState
  title="Ingen ordrer endnu"
  text="Ordrer fra dine kolleger vises her, når de er godkendt."
  action={<a className={buttonClasses({ variant: 'outline' })} href="/katalog">Gå til kataloget</a>}
/>
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| title (required) | `string` |  | What is missing, as a heading. |
| level | `2 \| 3 \| 4` | `3` | The heading level of the title. |
| text | `string` |  | Why it is empty, and what makes it fill. |
| action | `ReactNode` |  | The one way out, such as a link styled with buttonClasses. |

Do:
- Tell an empty list from an empty search: "Ingen ordrer endnu" is not "Ingen ordrer i perioden".
- Give one way out.

Do not:
- Do not leave a table with only its header. Show the empty state instead.
- Do not decorate it with an illustration or an icon the set does not have.

Accessibility:
- The title is a heading, so it lands in the outline of the page.

Tokens it uses:
- color.border.default
- color.text.muted
- radius.sm
- type.heading.md
- type.body.md
- space.inline.3
- space.section.1

---

Not drawn in Figma. Kasper decided on 20 November 2026 that internal software gets this set now, built only from the tokens. The look is ours until Peter draws it, and every open choice is a question in docs/SPOERGSMAAL-TIL-PETER.md. The public site, campaigns and brand surfaces use only the components drawn in Figma.

The rules for this set and all 33 components: https://design.id-hub.dk/software.md. Token values: https://design.id-hub.dk/tokens.md.

Index of everything, as text: https://design.id-hub.dk/llms.txt. Never invent a colour, a size, a component or a product fact: if it is not here, it does not exist yet.
