Item

A row of a list: an icon or picture, a title and description, and actions at the end.

@cupertinoui/itemRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/item

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

Usage

import { Item, ItemContent, ItemDescription, ItemMedia, ItemTitle } from "@/components/ui/item"

<Item variant="outline">
  <ItemMedia variant="icon"><WifiIcon /></ItemMedia>
  <ItemContent>
    <ItemTitle>Wi‑Fi</ItemTitle>
    <ItemDescription>Connected</ItemDescription>
  </ItemContent>
</Item>

API Reference

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

Item

PropTypeDescription
variant"default" | "outline" | "muted"
Default: "default"
Plain, outlined or filled.
size"default" | "sm" | "xs"
Default: "default"
The padding.
renderReactElementRender a link with the item's styles.
classNamestringExtra classes, merged with the component's own.

ItemMedia

PropTypeDescription
variant"default" | "icon" | "image"
Default: "default"
How the media is framed.
classNamestringExtra classes, merged with the component's own.