Skip to content

EmptyState

Placeholder layout shown when a view has no data, with guidance and next actions.

  • stable
  • since v0.1.0
  • 3.2 kB
  • feedback
  • empty
  • onboarding

Compound parts compose into a labelled heading + description. EmptyStateIcon is decorative (aria-hidden="true"); EmptyStateTitle defaults to a <h3> and should be the primary label inside the empty region.

Preview
Open
tsx

EmptyState ships four sizes — sm, md (default), lg, and xl. Bigger sizes are intended for first-run, full-page empty views; smaller sizes fit inline panels.

Preview
Open
tsx

The subtle variant softens the surface for inline empty regions inside cards and panels. The default default variant stands on its own.

Preview
Open
tsx

Compose primary and secondary actions inside EmptyStateActions to direct the user toward the next step.

Preview
Open
tsx
PropTypeDefaultDescription
size
"sm"|"md"|"lg"|"xl"
md
Vertical and typographic scale. One of `sm`, `md`, `lg`, `xl`.
variant
"default"|"subtle"
default
Surface treatment. `default` adds a bordered card; `subtle` blends with the surrounding container.
  • EmptyStateTitle renders as <h3> by default — override with as="h2" or as="h4" so the heading level matches the surrounding outline.
  • EmptyStateIcon is wrapped in a span with aria-hidden="true" — illustrations should not be announced.
  • Use EmptyStateDescription to give an action-oriented next step, not just a restatement of the empty status.
  • EmptyStateActions is a <div> — wrap focusable controls so they remain in document tab order.
  • Keep the entire region focusable in scroll order so keyboard users encounter it the same way as sighted users.
  • Show an empty state on first sign-up to explain the feature without data.
  • Pair a primary Button with a secondary link inside EmptyStateActions.
  • Reserve the xl size for full-page zero-data screens; use sm inside compact panels.
  • Use the subtle variant inside cards to avoid stacking heavy surfaces.