EmptyState

The block a surface shows when it has nothing to show: a title, a short explanation and one action. No illustration set to maintain.

Examples

With an action

No projects yet

Create a project to start tracking work.

Show code
<EmptyState
  title="No projects yet"
  description="Create a project to start tracking work."
>
  {#snippet action()}
    <Button>New project</Button>
  {/snippet}
</EmptyState>

With an icon

No results

Try a different search.

Show code
<EmptyState title="No results" description="Try a different search.">
  {#snippet icon()}
    <svg viewBox="0 0 20 20">…</svg>
  {/snippet}
</EmptyState>

Props

PropTypeDefaultDescription
titlestring—The heading.
descriptionstring—Optional supporting line.
level2 | 3 | 43Heading level for the title.
iconSnippet—Optional icon, rendered inside a bordered circle.
actionSnippet—Optional call to action below the copy.

Every part except the title is optional. The heading level defaults to h3 so it sits under a page or card heading; set level to match your outline.