Empty
shadcn/uiDisplay an empty state when there's no data to show.
Empty
No Projects Yet
You haven't created any projects yet. Get started by creating your first project.
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle,} from "@/components/optics/empty";import { Button } from "@/components/optics/button";import { FolderCode } from "lucide-react";<Empty> <EmptyHeader> <EmptyMedia variant="icon"> <FolderCode className="size-6" /> </EmptyMedia> <EmptyTitle> No Projects Yet </EmptyTitle> <EmptyDescription> You haven't created any projects yet. Get started by creating your first project. </EmptyDescription> </EmptyHeader> <EmptyContent> <div className="flex gap-2"> <Button> Create Project </Button> <Button variant="outline"> Import Project </Button> </div> </EmptyContent></Empty>import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle,} from "@/components/optics/empty";import { Button } from "@/components/optics/button";import { FolderCode } from "lucide-react";<Empty> <EmptyHeader> <EmptyMedia variant="icon"> <FolderCode className="size-6" /> </EmptyMedia> <EmptyTitle> No Projects Yet </EmptyTitle> <EmptyDescription> You haven't created any projects yet. Get started by creating your first project. </EmptyDescription> </EmptyHeader> <EmptyContent> <div className="flex gap-2"> <Button> Create Project </Button> <Button variant="outline"> Import Project </Button> </div> </EmptyContent></Empty>Installation
pnpm dlx shadcn@latest add @optics/empty
Props
<EmptyMedia />
Name | Type | |
|---|---|---|
variant | string(default: default) |