No messages yet
When you receive a message, it will show up here.
Installation
npx logic2b@next add emptyUsage
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/ui/empty"
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
<InboxIcon />
</EmptyMedia>
<EmptyTitle>No messages yet</EmptyTitle>
<EmptyDescription>
When you receive a message, it will show up here.
</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button size="sm">Compose message</Button>
</EmptyContent>
</Empty>
Examples
With Actions
No projects yet
Create your first project to get started.
Minimal
404 — Not Found
The page you are looking for does not exist. Go home.
Live playground
Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.
Generated JSX
<Empty
className="w-full max-w-md border"
>
<EmptyHeader>
<EmptyTitle>No components selected</EmptyTitle>
<EmptyDescription>Choose a component to add it to your installation plan.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<button
type="button"
className="rounded-md border px-3 py-2 font-medium"
>Browse components</button>
</EmptyContent>
</Empty>No components selected
Choose a component to add it to your installation plan.
API reference
Generated from the public TypeScript exports in src/ui/empty.tsx.
Empty
ComponentProps: React.ComponentProps<"div">EmptyHeader
ComponentProps: React.ComponentProps<"div">EmptyTitle
ComponentProps: React.ComponentProps<"div">EmptyDescription
ComponentProps: React.ComponentProps<"p">EmptyContent
ComponentProps: React.ComponentProps<"div">EmptyMedia
ComponentProps: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | null | "default" | "icon" | No | "default" | — |
Accessibility contract
Machine-readable behavior and consumer responsibilities for empty.
- Support
- Composition contract
- Pattern
- empty state
- HTML div
Built-in semantics
- Preserves native heading, paragraph and action semantics without forcing a live-region announcement.
Consumer responsibilities
- Use a heading that names the empty state and make the primary recovery action keyboard reachable.