# Empty state

> Centered icon + title + copy + optional action for a list/table with no data yet.

- Group: Feedback
- Status: stable
- Aliases: empty
- HTML page: https://design.ipmnx.com/components/empty-state/
- Spec: https://design.ipmnx.com/design/#nx-empty-state

## Preview

**No jobs**

```html
<div class="nx-empty">
  <span class="nx-empty__icon" aria-hidden="true">▤</span>
  <span class="nx-empty__title">No jobs</span>
  <span>Create your first job to get started.</span>
  <button class="nx-btn nx-btn--primary nx-btn--sm" type="button"
      style="margin-top:8px">Create job</button>
</div>
```

```tsx
<NxEmptyState
  icon="▤"
  title="No jobs"
  action={<NxButton className="nx-btn--sm">Create job</NxButton>}
>
  Create your first job to get started.
</NxEmptyState>
```

## API

### React props (NxKit)

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `title` | `ReactNode` |   | yes | What is empty. |
| `action` | `ReactNode` |   | yes | The next step. Required. |
| `icon` | `ReactNode` | `undefined` |   | Decorative, aria-hidden. |

### Classes

| Class | Description |
| --- | --- |
| `.nx-empty` | Centered column, padded |
| `.nx-empty__icon` | Decorative, aria-hidden |
| `.nx-empty__title` | Ink, semibold |

## Accessibility

- The icon is aria-hidden; the title + copy carry the meaning.
- Always offer the next action (a button) rather than a dead end.

## Do / Don't

- Do: Always pair the empty message with a primary next action.
- Don't ship an empty table/list cell with no guidance at all.

## Related

- [Table](https://design.ipmnx.com/components/table.md)
- [Alert](https://design.ipmnx.com/components/alert.md)

---

Source: registry.js (NX Design System)
