Item
A flexible row for a thing with media, a title, a description and actions: settings, files, people. Drop-in for shadcn's Item, with List's paddings, type and state layer. Use it when you need more freedom than a List row: a header, a footer, or your own content inside.
Install
npx shadcn@latest add @nelumbo/itemVariants
Default is bare, outline is a ring in outline-variant (drawn inside, not a border), muted is a tonal tile.
Group
An ItemGroup is a segmented surface like List: tiles 2px apart, outer corners rounded. ItemSeparator is spacing that starts a new group. asChild makes the whole item a link; the item gets a state layer and a press squeeze.
People, with selection
Image media for an avatar. onClick makes an item interactive, selected fills it with secondary and the icon tile inverts.
Header and footer
ItemHeader and ItemFooter take a full row above and below the content (flex-basis 100%).
Usage
import { Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemSeparator, ItemTitle } from "@/components/ui/item"<ItemGroup> <Item asChild> <a href="/settings/display"> <ItemMedia variant="icon"><Icon name="palette" /></ItemMedia> <ItemContent> <ItemTitle>Display</ItemTitle> <ItemDescription>Dark theme, blue accent</ItemDescription> </ItemContent> <ItemActions><Icon name="chevron_right" /></ItemActions> </a> </Item> <ItemSeparator /> <Item variant="outline" size="sm">…</Item></ItemGroup>Props
| Prop | Type | Default | Notes |
|---|---|---|---|
Item variant | "default" | "outline" | "muted" | "default" | Outline is a ring inside the item; in a group, default and muted are tiles. |
Item size | "default" | "sm" | "default" | Default is List's 56px row, sm is 44px. |
Item asChild | boolean | false | Render your own link or button; it takes the item's look. |
Item interactive | boolean | asChild or onClick | State layer, pointer and press squeeze. |
Item selected | boolean | false | Secondary fill; the icon tile inverts. |
ItemGroup variant | "segmented" | "plain" | "segmented" | Plain leaves items loose, 8px apart. |
ItemMedia variant | "default" | "icon" | "image" | "default" | Icon sits the glyph on a 40px tonal tile; image is a 40px rounded crop. |
ItemSeparator | div props | Spacing; starts a new group of tiles. No line. | |
ItemContent / ItemTitle / ItemDescription / ItemActions / ItemHeader / ItemFooter | Layout parts; same as shadcn. |