Skip to content
shadcn.io
shadcn.io is not affiliated with official shadcn/ui

Shadcn Item for React and Tailwind

A versatile component for displaying content.

Basic Item

A simple item with title and description.

Your profile has been verified.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/item.json

Anatomy

ItemGroup
├── ItemSeparator
└── Item
    ├── ItemMedia
    ├── ItemHeader
    ├── ItemContent
    │   ├── ItemTitle
    │   └── ItemDescription
    ├── ItemActions
    └── ItemFooter

Usage

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

Variant

Default

Outline

Muted

Custom spacing

The [--space:--spacing("value")] on ItemContent controls the internal spacing.

Default spacing is --spacing(3).

You can use breakpoint utilities to change the internal spacing at different screen sizes.

  md:[--space:--spacing(6)] lg:[--space:--spacing(8)]

Examples

Icon

Avatar

Image

Group

Use ItemGroup to group related items together.

Use ItemHeader to add a header above the item content.

Use the asChild prop to render the item as a link. The hover and focus states will be applied to the anchor element.

Use Item inside a menu or dropdown to display rich content in menu items.

API Reference

Item

Layout for list items with media, title, description, and actions. Use [--space:--spacing("value")] via className to control padding and gap. Supports asChild.

PropTypeDefault
variant"default" | "outline" | "muted""default"
asChildbooleanfalse
classNamestring-
AttributeDefault
--space--spacing(3)

ItemGroup

Groups related items with consistent spacing. Uses a fixed gap; adjust layout with className if needed. Has role="list" for accessibility.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemSeparator

Horizontal divider between items in a group.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemMedia

Avatar, icon, or image for the item. Supports icon and image variants.

PropTypeDefault
variant"default" | "icon" | "image""default"
classNamestring-
asChildbooleanfalse

ItemContent

Wraps the item title and description text.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemTitle

Primary title or heading for the item.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemDescription

Secondary description or subtitle for the item.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemActions

Holds action buttons or controls.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemHeader

Full-width header row above the item content.

PropTypeDefault
classNamestring-
asChildbooleanfalse

ItemFooter

Full-width footer row below the item content.

PropTypeDefault
classNamestring-
asChildbooleanfalse