Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Empty

Displays an empty state placeholder with an icon, title, description and actions.

No messages yet

When you receive a message, it will show up here.

Installation

npx logic2b@next add empty

Usage

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>

API reference

Generated from the public TypeScript exports in src/ui/empty.tsx.

View JSON

Empty

Component
Props: React.ComponentProps<"div">

EmptyHeader

Component
Props: React.ComponentProps<"div">

EmptyTitle

Component
Props: React.ComponentProps<"div">

EmptyDescription

Component
Props: React.ComponentProps<"p">

EmptyContent

Component
Props: React.ComponentProps<"div">

EmptyMedia

Component
Props: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>
PropTypeRequiredDefaultDescription
variantnull | "default" | "icon"No"default"—

Accessibility contract

Machine-readable behavior and consumer responsibilities for empty.

View JSON
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.