# Empty state

Stands in for a view's content when there is none, or when it couldn't load.

This is the HTML to build it with `dex.css`, for work outside the Dex codebase. Read https://brand.meetdex.ai/design.md first: it says how to set up a page and how to use the stylesheet. The page at https://brand.meetdex.ai/components/empty-state shows the Dex app's own React component, which only works inside the Dex codebase.

## HTML

```html
<div class="dex-empty">
  <svg aria-hidden="true"><!-- Lucide inbox, only where it adds meaning --></svg>
  <h2 class="dex-empty-title">No applications yet</h2>
  <p class="dex-empty-description">When you start an application from a match, it shows here until the team replies.</p>
</div>
```

- **Failed to load**: `dex-empty--danger` turns the icon red, with one action that tries again.

```html
<div class="dex-empty dex-empty--danger">
  <svg aria-hidden="true"><!-- Lucide circle-alert --></svg>
  <h2 class="dex-empty-title">We couldn't load your matches</h2>
  <p class="dex-empty-description">Check your connection, then try again.</p>
  <div class="dex-empty-actions"><button class="dex-button dex-button--outline dex-button--sm">Try again</button></div>
</div>
```

- **Small**: `dex-empty--sm` in a pane, a tab, a side rail or a dialog. The default is for a whole view.
- **A one-line note**, such as "Type at least 2 characters to search", is a `dex-empty-description` with no title.

## Rules

- It sits on the surface its content would be on, with no card of its own. Give it a height, or `flex: 1`, to centre it down the space.
- The title says what's missing, in sentence case with no full stop. The description is one or two plain sentences on why, or what to do.
- An icon only where it adds meaning, standing on its own in muted grey. Never put it in a circle.
- One action, or two at most.
