Skip to content

shadcn.io is not affiliated with official shadcn/ui

Shadcn Empty for React

Placeholder for empty or zero-state views.

No Projects Yet
You haven't created any projects yet. Get started by creating your first project.
Learn More

Installation

bunx --bun shadcn@latest add https://kit.dev/r/aria/empty.json

Usage

import { FolderCodeIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/ui/empty";
<Empty>
  <EmptyHeader>
    <EmptyMedia variant="icon">
      <FolderCodeIcon aria-hidden="true" />
    </EmptyMedia>
    <EmptyTitle>No Projects Yet</EmptyTitle>
    <EmptyDescription>
      You haven&apos;t created any projects yet.
    </EmptyDescription>
  </EmptyHeader>
  <EmptyContent>
    <Button>Create Project</Button>
  </EmptyContent>
</Empty>

Demos

Outline

Use a dashed border for an outlined empty state.

Background

Use background utilities on Empty.

Avatar

Use EmptyMedia with an avatar.

Avatar Group

Use EmptyMedia with an avatar group.

Input Group

Add an InputGroup inside EmptyContent.

Card

Empty state with linked actions.

Rtl

Right-to-left empty. See the RTL configuration guide for document direction.

API Reference

Empty

PropType
AttributeType

EmptyHeader

PropType
AttributeType

EmptyMedia

PropType
AttributeType

EmptyTitle

PropType
AttributeType

EmptyDescription

PropType
AttributeType

EmptyContent

PropType
AttributeType