Shadcn Empty
React empty state for no-data lists and first-run screens. Built with TypeScript and Tailwind CSS for Next.js using Base UI — icon, title, description, and action.
Empty is a centered zero-data block: media, a title, a short reason, and a next step. Use it when a list, a search, or a panel has nothing to show. It is layout only — you write the copy and wire the action.
Looking for a neobrutalism version for shadcn?
Same empty, thicker borders. The NeoBrutalism empty is the kit if you want that look.
Usage
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/ui/empty"<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
<FolderIcon />
</EmptyMedia>
<EmptyTitle>No projects yet</EmptyTitle>
<EmptyDescription>Create your first project to get started.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button>Create Project</Button>
</EmptyContent>
</Empty>variant="icon" is the muted tile. Leave it off for an avatar or an illustration.
Composition
EmptyContent is buttons, an input, or a link.
Outline
border on Empty. The root already has border-dashed — add the width so the box shows.
Background
bg-muted/30 or a bg-gradient-*. Same parts, a filled panel instead of a dashed edge.
Avatar
EmptyMedia default plus an Avatar. Use it when the empty thing is a person, not a folder.
Avatar Group
Several faces in the media slot. Overlap them — this is a team with nobody on it yet.
InputGroup
Drop an Input Group in EmptyContent when the next step is search, not create.
RTL
Wrap with DirectionProvider and dir="rtl". Copy is Arabic; the arrow uses data-icon="inline-end".
API
Prop
Type
EmptyMedia
Prop
Type
EmptyHeader, EmptyTitle, EmptyDescription, and EmptyContent take className. Links inside EmptyDescription get an underline.
Notes
First-run is not no-results
Zero projects, zero search hits, and a failed fetch are three screens. Same Empty, different title and action. Do not reuse “No data” for all three.
Let Empty fill the same region the list would — a tiny message in a tall card looks broken.
With other components
Create or import
AvatarFace in the media
Input GroupSearch under the title
CardFrame around the zero
TableEmpty query result
SpinnerLoading in the media
Questions
Related
Was this page helpful?
Sign in to leave feedback.
Dropdown Menu
React dropdown menu for actions, account menus, and settings. Built with TypeScript and Tailwind CSS for Next.js using Base UI — groups, shortcuts, and nested submenus.
Field
React field for labeled controls on checkout and settings forms. Built with TypeScript and Tailwind CSS for Next.js using Base UI — orientation, fieldsets, and errors.