Empty

The empty state of a list or pane: a large grey symbol, a title and a hint.

@cupertinoui/emptyRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/empty

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Empty, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty"

<Empty>
  <EmptyHeader>
    <EmptyMedia><InboxIcon /></EmptyMedia>
    <EmptyTitle>No Messages</EmptyTitle>
    <EmptyDescription>Messages you receive appear here.</EmptyDescription>
  </EmptyHeader>
</Empty>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

EmptyMedia

PropTypeDescription
variant"default" | "icon"
Default: "default"
A large symbol, or a symbol on a tile.
classNamestringExtra classes, merged with the component's own.

Empty / EmptyHeader / EmptyTitle / EmptyDescription / EmptyContent

PropTypeDescription
classNamestringExtra classes, merged with the component's own.