StorybookGitHub

Empty

Use the Empty component to display an empty state.

No projects yet
Get started by creating a new project.

Installation

npx shadcn@latest add https://reactdocs.canceydejean.dev/r/empty.json

Usage

Use empty states for blank lists, search misses, and first-run screens.

import { Button } from "@/components/button/button";
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/empty/empty";

export function Example() {
  return (
    <Empty>
      <EmptyHeader>
        <EmptyMedia variant="icon">{/* icon */}</EmptyMedia>
        <EmptyTitle>No projects yet</EmptyTitle>
        <EmptyDescription>
          Get started by creating a new project.
        </EmptyDescription>
      </EmptyHeader>
      <EmptyContent>
        <Button>Create project</Button>
      </EmptyContent>
    </Empty>
  );
}

EmptyMedia accepts variant="icon" for a muted icon well, or default for custom media.