# EmptyState

> What a screen says when there's nothing on it yet. One of Rost's drawings, a line saying why, a sentence on what to do, and the button that does it.

| | |
|---|---|
| Kind | component |
| Contract | `review` · [empty-state.contract.yaml](https://github.com/Runceanu/rost/blob/master/contracts/empty-state.contract.yaml) |
| Guidance | `proposed` |
| Source | [Figma 742:62](https://www.figma.com/design/1Zy0wiWKXQAvsfDBX3KR0d/UI-Kit-v01?node-id=742-62) · read 2026-11-16 · frozen 2026-11-16 |
| Implemented in | nowhere yet |

## Install

It lands in `src/rost/empty-state/`, with what it needs and its contract:

```sh
npx github:Runceanu/rost add empty-state
```

Then import `src/rost/fonts.css` and `src/rost/tokens.css` once, at the root of the app. More on this in [Install](https://rost.build/docs/install.md).

## Props

| Prop | Type | Values | Default |
|---|---|---|---|
| `illustration` | slot |  |  |
| `title` | slot |  |  |
| `children` | slot |  |  |
| `action` | slot |  |  |

## Anatomy

- `root`: A column, centred, 16px between its parts and 40px around them.
- `illustration`: An Illustration, as it is, 72px.
- `title`: Sub-title type, medium weight, in the main text colour.
- `body`: Paragraph type, a step quieter, no wider than 320px so it stays a short block.
- `action`: A Button, as it is.

## When to use

- **Nothing here yet.** A list or a screen before its first item: no clients, no invoices this month. Say why, and offer the way to the first one.

## When not to use

- **No results.** A search that found nothing needs one line in place of the results, not a drawing.
- **Errors.** Something that failed. That's **InlineBanner**, with what to do.

## Behaviour

A drawing, a title, a sentence and at most one Button, centred. It adds nothing to the drawing or the Button: they're Rost's own.

## Accessibility

- **Element**: A `<div>`. The title is a heading (`h2` by default, `as` changes it) so it's found by headings.
- **Name**: The title.
- **Colour**: The title is 14:1 and the sentence 11:1 on the dark page. The drawing is decoration and is hidden from screen readers.

## Content

The title says why ("No invoices yet"), the sentence what to do, the button the verb ("New invoice").

## Tokens

Every token this component uses, across all its variants.

| Token | Resolves to |
|---|---|
| `empty-state/body` | `#d3d9d5` |
| `empty-state/title` | `#ededed` |
| `font-family/base` | `'General Sans Variable'` |
| `spacing/gap/2xlarge` | `40px` |
| `spacing/gap/medium` | `16px` |
| `typography/paragraph/font-size` | `14px` |
| `typography/paragraph/font-weight/regular` | `400` |
| `typography/paragraph/letter-spacing` | `0px` |
| `typography/paragraph/line-height` | `20px` |
| `typography/sub-title/font-size` | `20px` |
| `typography/sub-title/font-weight/medium` | `500` |
| `typography/sub-title/letter-spacing` | `0px` |
| `typography/sub-title/line-height` | `28px` |

See it live, with every value of every variant: [rost.build/components/empty-state/](https://rost.build/components/empty-state/)
