Empty
What a place looks like before it has anything in it, and how to fill it.
Tip: pressโNfrom anywhere to start a document.
When to use it
Use Empty when a list, table, or search has nothing to show. Say what will appear here and offer the action that fills it.
For a search with no results, suggest a change to the search instead of an action.
Alert
Stays on the page.
Warnings and errors about this page.
EmptyThis page
Nothing here yet.
Tip: pressโNfrom anywhere to start a document.
First runs and empty searches.
How it behaves
Compose Empty with EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, and EmptyContent for actions. The column centers in its container while text and actions stay left-aligned.
EmptyMedia shows an illustration by default: pass an icon from your set and it renders at 64px in the muted color with thinned strokes. variant="icon" places a small icon in a control-filled tile instead.
EmptyDescription uses 16px muted body text; separate paragraphs stack with a small gap, and inline Kbd or icons sit on the text line. Say what belongs here and how to add it.
Lead with one primary action and keep secondary actions quieter, such as the secondary Button. Add border for a dashed panel inside a larger surface. For a list that is empty only because of a filter, say so and offer to clear it.
Build it
Add it with the shadcn CLI:
1pnpm dlx shadcn@latest add https://jzbui.com/r/empty.jsonA complete example. Change the values to fit your product:
12345678910111213141516171819import { FileText } from "lucide-react"import { Button } from "@/components/ui/button"import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty"
<Empty> <EmptyHeader> <EmptyMedia> <FileText aria-hidden="true" /> </EmptyMedia> <EmptyTitle>No documents yet</EmptyTitle> <EmptyDescription>Documents you create or that teammates share with you will show up here.</EmptyDescription> </EmptyHeader> <EmptyContent> <div className="flex gap-2"> <Button>New document</Button> <Button variant="secondary">Import files</Button> </div> </EmptyContent></Empty>The full source is yours to edit once installed: