Skip to content

ComponentsDisplay

Item

A flexible list row with media, a title, a quiet second line and trailing actions. Three surface variants, three sizes and four media styles; stack rows in an ItemGroup, divide them with ItemSeparator, or apply itemVariants to a link. API-compatible with shadcn's Item.

Source
Web SDK

2.4M events/day

Live
iOS SDK

v3.2.0 · 3 apps

Live
Product database

Postgres replica

Installation

pnpm dlx shadcn@latest add @desyne/item

The CLI installs dependencies and any other components this one uses.

Usage

tsx
import {
  Item,
  ItemActions,
  ItemContent,
  ItemDescription,
  ItemGroup,
  ItemMedia,
  ItemSeparator,
  ItemTitle,
  itemVariants,
} from "@/components/ui/item";
tsx
<ItemGroup>
  <Item>
    <ItemMedia variant="icon">
      <GlobeIcon />
    </ItemMedia>
    <ItemContent>
      <ItemTitle>Web SDK</ItemTitle>
      <ItemDescription>2.4M events/day</ItemDescription>
    </ItemContent>
    <ItemActions>
      <Button variant="outline" size="xs">Configure</Button>
    </ItemActions>
  </Item>
</ItemGroup>

Layout only, no collection behavior

Item is a styled <div> with no keyboard navigation or selection. It's ideal for static rows, settings lists and rows with their own buttons. For rows the user selects or navigates with arrow keys, use a List Box or Grid List.

When to use

  • Item: a row that shows an entity (a file, an integration, a person, a payment method) with optional actions. Works in cards, sidebars, popovers and pages.
  • Grid List: an interactive list with selection, keyboard navigation or drag and drop.
  • List Box: a list of selectable options.
  • Table: when rows share several columns that users compare or sort.
  • Card: a larger, self-contained block with its own header and footer.

Anatomy

tsx
<ItemGroup>              {/* vertical stack of rows */}
  <Item>                 {/* row: variant, size */}
    <ItemMedia />        {/* icon tile, round mark, image or avatar */}
    <ItemContent>        {/* grows, truncates */}
      <ItemTitle />      {/* medium weight, can hold a badge */}
      <ItemDescription />{/* quiet second line */}
    </ItemContent>
    <ItemActions />      {/* trailing buttons, switches, badges */}
  </Item>
  <ItemSeparator />      {/* inset hairline between rows */}
</ItemGroup>
PartRendersNotes
ItemGroup<div>Flex column with a 2px gap. Carries data-slot="item-group".
Item<div>Row. Flex, centered, 12px gap, rounded. Sets the group/item Tailwind group.
ItemMedia<div>Leading visual. icon, round and image variants set the size and surface.
ItemContent<div>Takes the remaining width (flex-1 min-w-0) so long text truncates instead of pushing actions out.
ItemTitle<div>Single line, truncated. Flex with a gap, so an inline badge or icon sits next to the text.
ItemDescription<p>Muted, single line, truncated.
ItemActions<div>Trailing flex row that never shrinks.
ItemSeparator<div>1px line inset 12px from each side. Decorative.

Examples

Variants

default is transparent, for rows inside a list, card or popover. muted fills the row to highlight it, for example the selected, unread or featured one. outline gives the row a bordered card surface so it can stand on its own.

default

Transparent. Rows inside a list or card.

muted

Muted fill. Selected or featured rows.

outline

Bordered card surface. Standalone rows.

Sizes

size sets the row padding: sm for dense lists and sidebars, md (default) for most lists, lg for spacious settings pages.

Quarterly reports

size="sm" · 14 files

Quarterly reports

size="md" · 14 files

Quarterly reports

size="lg" · 14 files

Media

icon is a bordered 36px tile for icons and logo marks, round a 36px circle you color yourself, and image a 40px cover-fit thumbnail for an <img>. The default variant adds no size or surface, so any element fits, such as an Avatar, or your own tinted tile.

Icon tile

variant="icon" · bordered 36px square

Round mark

variant="round" · brand-colored circle

Image thumbnail

variant="image" · 40px, cover-fit

Any element

variant="default" · e.g. an Avatar

Custom tint

Your own size and colors

Actions and inline badges

ItemActions holds buttons, a menu trigger or a Switch. ItemTitle lays out its children in a row, so a Badge sits next to the title. Label switches with the row's title via aria-labelledby, and give icon buttons an aria-label that names the row.

Visa ending in 4242Default

Expires 08/28

Two-factor authentication

Require a code at every sign-in.

Invoice INV-1042

Paid Sep 1, 2026 · $2,500.00

For rows that navigate, apply itemVariants to an <a> (or a Next.js or React Aria Link). The styles add a hover background and a keyboard focus ring when the element is a link or button. Use the group-hover/item: variant to animate the chevron.

Group with separators

ItemGroup stacks rows with a 2px gap. Put it in a bordered container with gap-0, and place ItemSeparators between rows for a divided list.

Q3 board update.pdf

2.4 MB · Edited 2h ago

Revenue model.xlsx

860 KB · Edited yesterday

Launch plan.key

18 MB · Edited Sep 24

Recipes

Integrations

A connected-apps list: icon tiles, a "Not connected" badge in the title, and either a switch or a connect button per row.

Team chat

Post deploy and incident alerts to #ops.

Calendar

Block focus time around on-call shifts.

Email digest

A weekly summary of usage and spend.

Data warehouseNot connected

Sync events to Snowflake or BigQuery.

File list

Standalone outline rows with image thumbnails, a download button and a per-row Menu.

hero-lisbon.jpg

2.1 MB · 2400 × 1600

team-offsite.jpg

3.4 MB · 3000 × 2000

product-shot.png

860 KB · 1600 × 1200

Notifications

Unread rows use variant="muted" plus visually hidden "Unread" text, so the state isn't conveyed by color alone. Marking a row read switches it back to default.

Isabella Nguyen requested your review on Billing v2

Unread. 5m ago

William Kim mentioned you in Incident #214

Unread. 1h ago

Sofia Davis shared Q4 roadmap with the team

Yesterday

Accessibility

  • Item and its parts are plain elements with no role. Wrap a list of rows in <ul>/<li>, or add role="list" / role="listitem", when the list structure matters to screen reader users.
  • ItemTitle is a <div>. If rows are sections with their own headings, put a heading element inside it.
  • Don't attach onClick to an Item <div>. For navigation, render the row as a link with itemVariants; for selection, use a Grid List.
  • Don't nest interactive elements inside a link row. If a row both navigates and has actions, use a stretched link in the title instead (see the interactive cards pattern).
  • Title and description truncate with an ellipsis. Truncated text is still read in full by screen readers; add a title attribute or a tooltip if sighted users need the full text too.
  • Give controls in ItemActions names that identify the row, e.g. aria-label="Download report.pdf" rather than just "Download".

Styling

Data attributes

AttributeOnPresent when
data-slot="item-group"ItemGroupAlways
data-slot="item"ItemAlways
data-slot="item-media"ItemMediaAlways
data-slot="item-content"ItemContentAlways
data-slot="item-title"ItemTitleAlways
data-slot="item-description"ItemDescriptionAlways
data-slot="item-actions"ItemActionsAlways
data-slot="item-separator"ItemSeparatorAlways

Item sets the group/item group, so children can react to row hover with group-hover/item:…. When itemVariants is applied to an <a> or <button>, it adds hover:bg-muted/70, a pointer (links) or default (buttons) cursor, left-aligned text for buttons and focus-visible ring styles.

itemVariants

The tailwind-variants function behind Item. Use it to turn links, buttons or React Aria collection items into rows.

tsx
import { itemVariants } from "@/components/ui/item";

<a href="/settings/profile" className={itemVariants({ size: "sm" })}>…</a>;

API Reference

Item

Prop

Type

Also accepts every prop of <div>.

ItemMedia

Prop

Type

Also accepts every prop of <div>.

ItemGroup / ItemContent / ItemTitle / ItemActions / ItemSeparator

No extra props. Each accepts every prop of <div>.

ItemDescription

No extra props. Accepts every prop of <p>.

itemVariants

Prop

Type

  • Grid List: interactive rows with selection and keyboard navigation.
  • Card: a container for a group of items.
  • Avatar: media for rows about people.
  • Table: multi-column data.