EmptyState
Explains why an area has no content and offers the next step.
import { EmptyState } from '@elluzion/iv-ui'; 01 Preview
Basic
A title and one line of explanation.
No deployments yet
Deployments appear here once the first build reaches production.
Source· svelte Show Hide
<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."
/>02 Usage
titlestates the condition;descriptionsays what to do next.actionholds the primary button;icontakes a snippet.- Use
childrenfor secondary detail below the description.
03 Examples
With action
The primary action sits below the description.
No saved queries
Save a query to reuse it from the command palette.
Source· svelte Show Hide
<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.
Archive is empty
Archived projects are kept for 90 days before they are removed.
Source· svelte Show Hide
<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>04 API
import { EmptyState } from '@elluzion/iv-ui';Props
3 props · 0 events · 3 snippets| 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. |
05 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.
06 Tokens & CSS hooks
Tokens used
Class hooks
.iv-empty-action.iv-empty-description.iv-empty-icon.iv-empty-state.iv-empty-title