---
title: "EmptyState"
description: "Explains why an area has no content and offers the next step."
category: "Feedback & Status"
slug: empty-state
url: /components/empty-state
since: "0.2.0"
status: "stable"
---

# EmptyState

Explains why an area has no content and offers the next step.

## Import

```svelte
import { EmptyState } from '@elluzion/iv-ui';
```

## Preview

A title and one line of explanation.

```svelte
<script lang="ts">
	import { EmptyState } from '@elluzion/iv-ui';
</script>

<EmptyState
	title="No deployments yet"
	description="Deployments appear here once the first build reaches production."
/>
```

## Usage

- `title` states the condition; `description` says what to do next.
- `action` holds the primary button; `icon` takes a snippet.
- Use `children` for secondary detail below the description.

## Examples

### With action

The primary action sits below the description.

```svelte
<script lang="ts">
	import { Button, EmptyState } from '@elluzion/iv-ui';
</script>

<EmptyState
	title="No saved queries"
	description="Save a query to reuse it from the command palette."
>
	{#snippet action()}
		<Button variant="primary" size="sm">Create query</Button>
	{/snippet}
</EmptyState>
```

### With icon

An icon snippet anchors the state without adding noise.

```svelte
<script lang="ts">
	import { IconArchive } from '@tabler/icons-svelte';
	import { EmptyState } from '@elluzion/iv-ui';
</script>

<EmptyState
	title="Archive is empty"
	description="Archived projects are kept for 90 days before they are removed."
>
	{#snippet icon()}<IconArchive size={20} />{/snippet}
</EmptyState>
```

### Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | `''` | Headline for the empty state. |
| `description` | `string` | `''` | Explanation of why the area is empty. |
| `className` | `string` | `''` | Extra classes merged onto the root element. |

### Snippets

| Snippet | Type | Description |
| --- | --- | --- |
| `icon` | `Snippet` | Illustration or icon shown above the title. |
| `action` | `Snippet` | Primary action, usually a button. |
| `children` | `Snippet` | Additional content below the action. |

### Tokens used

`--iv_border` · `--iv_font-sans` · `--iv_font-ui` · `--iv_foreground` · `--iv_foreground-dim` · `--iv_leading-base` · `--iv_leading-tight` · `--iv_radius-sm` · `--iv_spacing-2xl` · `--iv_spacing-sm` · `--iv_spacing-xs` · `--iv_surface-elevated` · `--iv_text-lg` · `--iv_text-sm` · `--iv_weight-semibold`

See the [token reference](/foundations/tokens.md) for values.

### CSS hooks

`.iv-empty-action` · `.iv-empty-description` · `.iv-empty-icon` · `.iv-empty-state` · `.iv-empty-title`

## Accessibility

- The title renders as an `h3`, so place the state inside a section with a higher-level heading.
- Use a real button or link in `action`; the empty state itself is not interactive.
- Keep the description text readable at small sizes; it uses the UI mono voice.

## Related

- [Alert](/components/alert.md)
- [Skeleton](/components/skeleton.md)
- [Card](/components/card.md)
- [Progress](/components/progress.md)