Empty state

Communicate an empty dataset or unavailable feature with copy and optional actions.

Examples

Properties

PropertyAttributeDescriptionType nameTypeDefault
sizesize`s` (small), `m` (medium), or `l` (large); matches Figma empty-state sizes.DuoEmptyStateSize"s" | "m" | "l""s"
headingheadingTitle when the default slot is empty.stringstring""
descriptiondescriptionSupporting text when the default slot is empty.stringstring""
headingIdheading-idId for the default `<h2>` when `heading` is used without default-slot content.stringstring""

Slots

NameDescription
defaultMessage body (e.g. `<h2>` + `<p>`). Replaces `heading` / `description` when provided.
mediaIllustration or icon above the message (e.g. `<duo-icon>`).
actionsPrimary/secondary actions (e.g. `<duo-button>`).

Usage

Empty state explains why a list or panel has no content yet and what the user can do next—optionally with illustration, title, description, and actions.

Do

  • Use for no items yet or missing configuration where the user can add or connect something.
  • Keep the actions slot to real <button> elements or links so keyboard users can proceed.
  • Use the default heading slot or attribute for a clear, scannable title.
  • Put illustrations in the media slot via <img src="…"> using a ?url import from @duo/assets (see Assets in the docs sidebar).

Don’t

  • Don’t use for loading or skeleton states—use loading indicators instead.
  • Don’t use for inline form validation—use field errors or a Banner.

Sizes

SizeWhen to use
sDense panels, sidebars, or modals.
mDefault empty lists and settings areas.
lFull-page or primary content areas that need stronger emphasis.