Empty
Empty states with media, title, description, and actions. For lists, searches, and error pages with nothing to show yet.
Installation#
pnpm dlx shadcn@latest add @davinciui/emptyUsage#
Empty is layout only — it centers and spaces your content. Bring your own icon, avatar, buttons, or inputs; the parts only own alignment and rhythm.
Empty ├── EmptyHeader │ ├── EmptyMedia │ ├── EmptyTitle │ └── EmptyDescription └── EmptyContent
Composition#
Use the following composition to build a Empty:
Empty
├── EmptyHeader
│ ├── EmptyMedia
│ ├── EmptyTitle
│ └── EmptyDescription
└── EmptyContentAPI Reference#
| Prop | Type | Default |
|---|---|---|
variantMedia treatment: custom host, gradient icon tile, or dashed drop-zone tile (EmptyMedia). | "default" | "icon" | "dashed" | "default" |
roleEmpty announces via role=status; override if you manage live regions yourself. | string | "status" |
classNameAdditional classes on any part. Border and bg utilities restyle the card. | string | — |
Accessibility#
Empty renders role='status' by default, so its title and description are announced politely when the state appears. Icon and dashed media variants are aria-hidden as decorative; default media is exposed, so provide alt text or labels for meaningful custom content.
Motion#
On mount it fades in and rises 8px over 200ms using motion-safe animate utilities; there is no exit animation and no timing props. When prefers-reduced-motion is set, motion-safe suppresses the entrance entirely.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

