Skip to main content

EmptyState

The canonical "nothing here" surface.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

  • Use it when A zero / no-results / error / offline state, with a clear next step.
  • Reach for something else when Brief loading — use Spinner or a skeleton.

Accessibility​

Communicates the situation in words and offers a clear next step; not reliant on illustration alone.

Install and import​

npx shadcn@latest add @prism/empty-state
import { EmptyState } from '@/components/prism/EmptyState';

In a no-build prototype, read it from the bundle instead: const { EmptyState } = window.PrismDesignSystem_39d121;

Examples​

No results

<EmptyState variant="no-results" title="No matches"
description="Try a different search." />

Error with retry

<EmptyState variant="error" title="Couldn’t load invoices"
actions={<Button onPress={retry}>Try again</Button>} />

Props​

PropTypeRequiredDescription
variantEmptyVariant—Picks the default glyph + tone. Default "empty". Not a style flag — each variant needs different COPY. "empty" explains the thing and offers the action that creates one; "no-results" offers to clear the filter and needs no explanation; "success" confirms and offers nothing; "error" apologises and may retry; "permission" must NOT offer retry — say who to ask, because "Try again" on a 403 is a lie.
sizeEmptySize—Footprint. Default "section".
titleReact.ReactNode—
titleAs"p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6"—Render the title as a heading — e.g. "h1" for an error page drawn with EmptyState. Default "p".
descriptionReact.ReactNode—
iconReact.ReactNode—Swap just the glyph (keeps the tinted disc).
illustrationReact.ReactNode—Replace the disc entirely with custom artwork.
actionsReact.ReactNode—Buttons / links rendered below the copy.
auxReact.ReactNode—Small auxiliary line under the actions (page/section only).
referenceReact.ReactNode—Request/trace id, printed verbatim and selectable. Never behind a disclosure — it is the first thing support asks for.