Aliases
blank slate
components / emptystate
Structured blank-slate surface for onboarding, first-use, and no-result moments.
Playground
Start here. Switch systems, interact with the shipped component, and let the rest of the page answer the why and how after the behavior clicks.
Cobalt
The crisp default DK action system: bright primary, roomy spacing, and a direct editorial rhythm.
Create your first item to get started.
Overview
This section explains the intent of the component before the implementation details.
Aliases
blank slate
Explore the math
Decision guide
Use these notes to decide quickly whether this is the right DK component for the job.
Decision guide
Do
Do not
Usage
Prefer these situations when choosing this component.
Usage
These patterns are better served by a different component or a simpler surface.
Anti-patterns
Migration notes
Anatomy
The anatomy explains which pieces matter to the recipe and accessibility model.
blank-slate shell
rootCarries spacing, tone, and structural rhythm.
optional visual cue
iconOptional symbol or lightweight illustration cue.
primary heading
titleShort statement of the missing or empty condition.
supporting guidance
descriptionClarifies why the space is empty or what to do next.
optional call-to-action area
actionsSupports the primary next step.
API
The docs contract distinguishes props, DOM events, and slots so integration behavior is explicit.
Props
| Name | Type | Default | Description |
|---|---|---|---|
tone | 'neutral' | 'brand' | 'warning' | 'neutral' | Chooses the blank-slate tone. |
size | 'sm' | 'md' | 'lg' | 'md' | Chooses the compiled size recipe for the component. |
title | string | — | Primary empty-state heading. |
description | string | — | Supporting explanation or guidance. |
theme | ThemeContract | — | Overrides the compiled DK theme used to resolve tokens and recipes for this component. |
Slots
| Name | Description |
|---|---|
icon | Optional icon or symbol. |
default | Optional richer body content. |
actions | Optional actions area. |
Recipes
These notes summarize the intended recipe surface rather than exposing raw implementation detail first.
Variants
Sizes
States
Accessibility
This is the behavior the component promises to assistive tech and keyboard users today.
Semantics
Keyboard
Screen readers
Checklist
Implementation
This section shows the representative compiled slot variables that the runtime consumes for the selected design system.
Implementation notes
Implementation checklist
Examples
Each example is intentionally practical, grouped by starter, common pattern, and edge-case coverage.
Starter
1 example
starter
Starter: first-use surfaceA calm blank slate with one action.
Copy snippet
<EmptyState title="No items yet" description="Create your first item to get started."><svelte:fragment slot="icon">◎</svelte:fragment></EmptyState>Common patterns
1 example
common
Common: encouraging onboardingBrand tone adds product energy when the blank state should feel invitational.
Copy snippet
<EmptyState tone="brand" title="Start your workspace" description="Invite the first team members to begin." />Edge cases
1 example
edge
Edge: no results after filteringWarning tone works when the absence may be unexpected or corrective.
Copy snippet
<EmptyState tone="warning" title="No matching results" description="Adjust the filters and try again." />Verification
Proofs stay visible in the docs so the system shows what it can guarantee, not just what it can render.
size=md|tone=neutral
size=md|tone=brand
size=lg|tone=danger