Skip to content
iv-ui v0.3.0

EmptyState

since 0.2.0

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

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

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."
/>
  • 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.

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>
import { EmptyState } from '@elluzion/iv-ui';

Props

3 props · 0 events · 3 snippets
PropTypeDefaultDescription
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

SnippetTypeDescription
iconSnippetIllustration or icon shown above the title.
actionSnippetPrimary action, usually a button.
childrenSnippetAdditional content below the action.
  • 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.
Class hooks
.iv-empty-action.iv-empty-description.iv-empty-icon.iv-empty-state.iv-empty-title
iv-ui
↑ ↓ navigate ↵ open esc close minisearch · 482 records