Skip to content
GitHub (opens in a new tab)

Empty

Placeholder when a list, page, or region has nothing to show. One piece.

stableMoleculecontracts/empty.json

Preview

Empty

Placeholder when a list, page, or region has nothing to show. Not EmptyHeader, EmptyMedia, or EmptyContent. Pick a kind and a size; failures use LoadError.

Master

First use, md: the brand tile, a title, one sentence and the one primary.

Connect billing

Connect Stripe to see revenue, invoices and plans here.

Usage

kind sets the icon and the role: no-data, no-results and permission are role=status, so they are read once; first-use has no role and is the only kind that may hold a primary Button. size sm sits in a chart, list or table cell with no heading; md fills a card body; lg fills a page. Compose Avatar or AvatarGroup in media.

Do's

  • A list or table has no rows
  • A page section has no content yet
  • A panel needs a centered placeholder with optional actions
  • Pick a kind: no-data (nothing in the range), no-results (a filter or search found nothing), first-use (nothing set up yet), permission (the person can't see it)
  • A featured look for the icon: pick tile outlined (a bordered card square) or circle (round); filled is the default tray square

Don'ts

  • Inline page status — use Alert
  • Chart with no data — charts use their own emptyLabel
  • Loading with no content — use Spinner or LoadingAnimation
  • Something failed to load — use LoadError
<Empty
  kind="first-use"
  title="Connect billing"
  description="Connect Stripe to see revenue, invoices and plans here."
  actions={<Button size="sm">Connect Stripe</Button>}
/>

When to use

  • A list or table has no rows
  • A page section has no content yet
  • A panel needs a centered placeholder with optional actions
  • Pick a kind: no-data (nothing in the range), no-results (a filter or search found nothing), first-use (nothing set up yet), permission (the person can't see it)
  • A featured look for the icon: pick tile outlined (a bordered card square) or circle (round); filled is the default tray square

When not to use

  • Inline page status — use Alert
  • Chart with no data — charts use their own emptyLabel
  • Loading with no content — use Spinner or LoadingAnimation
  • Something failed to load — use LoadError

What an agent reads

import { Empty } from "agentic-ds-kit";
must
  • Title uses a heading element at md and lg; at sm it is a sentence
  • Icon media is aria-hidden
  • Media that only decorates (an illustration) is aria-hidden or an img with alt=""; Avatar and AvatarGroup keep their names
  • kind no-data, no-results and permission set role=status so the change is read once; first-use has no role
  • When it replaces a Skeleton it takes the same space and focus does not move
  • Actions are regular interactive controls
defaults
  • outlined false
  • size md
  • tile filled
stops if
  • Do not invent EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, or EmptyContent
  • Do not show a failure with Empty — use LoadError
  • Do not put a primary Button in Empty unless kind is first-use (or size lg on a page)
  • Do not draw your own tile or rings in media — use tile; media is for Avatar, AvatarGroup or a decorative illustration
  • Do not write vague copy like Something went wrong or Nothing here — say what happened, then what to do
  • Do not use raw hex
  • Do not use glass, color-mix, or backdrop-blur

From contracts/empty.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
titlestringYes—The one sentence that says what happened, like "No invoice matches these filters." A heading at md and lg; plain text at sm.
descriptionstringNo—Supporting copy under the title.
iconKitIconNo—Overrides the kind's icon. Shown in the media tile (md, lg) or bare (sm). Not EmptyMedia. A curated Lucide name (PascalCase or kebab-case) renders instantly; any other Lucide name needs import "agentic-ds-kit/icons-on-demand" once (otherwise it is skipped with a dev warning). Or pass the Lucide component (Plus) or an element.
mediaslotNo—Custom media slot: kit Avatar/AvatarGroup, or a decorative app illustration marked aria-hidden (an <img alt=""> or an aria-hidden svg in semantic tokens). Replaces the icon tile. Not EmptyMedia.
actionsslotNo—Action row. Compose kit Buttons only. Not EmptyContent. Neutral sm Buttons, one verb each (Clear filters, Show 12 months, Request access). Only kind first-use may hold one primary Button; at lg, one primary and up to two neutral.
outlinedbooleanNofalseBordered empty state with surface-card background.
kindenumNo—Why it is empty. Sets the default icon (ChartLine, SearchX, Plug, Lock) and the role: role=status for no-data, no-results and permission, so it is read once; no role for first-use. first-use gets the brand tile. Errors are not a kind: use LoadError. Leave it out for a plain placeholder with no role. no-data | no-results | first-use | permission
sizesm | md | lgNomdsm: in a chart, list or table cell. Bare 16px icon and the title as one sentence on one row with no heading, one neutral sm Button. md: a whole card body. 32px icon tile and a title; put card actions in the Card footer. lg: a page. 40px tile, heading-5 title, one primary and up to two neutral Buttons.
tilefilled | outlined | circleNofilledThe icon tile at md and lg. filled: today's tray square (brand tint for first-use). outlined: surface.card with a border.faint border and shadow.xs. circle: the same fill, round. No effect at sm (no tile) or when media is set.
  • Component
    →

    Alert

    Inline status banner that stays on the page.

  • Component
    →

    Spinner

    Spinning circular loader for short indeterminate waits.

  • Component
    →

    LoadingAnimation

    Square dot-grid loading indicator for compact waits.

  • Component
    →

    LoadError

    What a list, card, chart or page shows when its data failed to load: an icon, what failed, a reference and Try again.