Item

A row that shows something or opens something: a settings menu, an order, a transaction, a help article. shadcn's Item, with our look on top. It picks nothing: a row that chooses one value among several is a Choice list, and a row that opens a picker is a Floating row.

Examples

Lines, cards, muted

Item has no layout prop the way ChoiceList does. Each look is composed:

  • Lines: ItemGroup className="gap-0" with an <ItemSeparator className="my-0" /> before every row but the first.
  • Cards: variant="outline" on each row, spaced by the group's gap.
  • Muted: variant="muted" on each row, a grey fill with no edge.

A row has no padding of its own here (upstream pads px-3 py-2.5), so the caller sets it: py-4 between lines, p-pad-1 inside a card.

DarkInspect

Anatomy

<ItemGroup className="gap-0">
  <Item render={<a href="/settings/notifications" />}>
    <ItemMedia variant="icon">
      <IconBell />
    </ItemMedia>
    <ItemContent>
      <ItemTitle>Notifications</ItemTitle>
      <ItemDescription>Offers, messages, sales</ItemDescription>
    </ItemContent>
    <ItemActions>
      <ItemChevron />
    </ItemActions>
  </Item>
  <ItemSeparator className="my-0" />…
</ItemGroup>
  • Item is the row; render makes it a link or a button, and a link row fills on hover.
  • ItemMedia leads: an icon (variant="icon") or a thumbnail (variant="image").
  • ItemContent holds ItemTitle and ItemDescription, which clamps at two lines.
  • ItemActions ends the row; ItemChevron is the one chevron every row that opens something wears.