docs/components/item
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
A versatile component for displaying content.
PreviewCode
Basic Item
A simple item with title and description.
Your profile has been verified.
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/item
ItemGroup
├── ItemSeparator
└── Item
├── ItemMedia
├── ItemHeader
├── ItemContent
│ ├── ItemTitle
│ └── ItemDescription
├── ItemActions
└── ItemFooter
import {
Item,
ItemActions,
ItemContent,
ItemDescription,
ItemMedia,
ItemTitle,
} from "@/components/ui/item";
<Item>
<ItemMedia />
<ItemContent>
<ItemTitle />
<ItemDescription />
</ItemContent>
<ItemActions />
</Item>
PreviewCode
Default Variant
Transparent background with no border.
PreviewCode
Outline Variant
Outlined style with a visible border.
PreviewCode
Muted Variant
Muted background for secondary content.
The [--space:--spacing("value")] on ItemContent controls the internal spacing.
Default spacing is --spacing(3).
PreviewCode
Compact spacing
Uses [--space:--spacing(2)] for tighter padding and gap.
Responsive spacing
Wider from md up with md:[--space:--spacing(5)].
You can use breakpoint utilities to change the internal spacing at different screen sizes.
md:[--space:--spacing(6)] lg:[--space:--spacing(8)]
PreviewCode
Security Alert
New login detected from unknown device.
Review
PreviewCode
PV
Pasquale Vitiello
Last seen 5 months ago
View
PreviewCode
Midnight City Lights
Electric Nights · Neon Dreams · 3:45
Coffee Shop Conversations
Urban Stories · The Morning Brew · 4:05
Digital Rain
Binary Beats · Cyber Symphony · 3:30
Use ItemGroup to group related items together.
PreviewCode
v
vinihvc
s
segunadebayo
p
pasqualevitiello
Use ItemHeader to add a header above the item content.
PreviewCode
v0-1.5-sm
Everyday tasks and UI generation.
v0-1.5-lg
Advanced thinking or reasoning.
v0-2.0-mini
Open Source model for everyone.
Use the asChild prop to render the item as a link. The hover and focus states will be applied to the anchor element.
PreviewCode
[
Visit our documentation
Learn how to get started with our components.
](/docs)[
External resource
Opens in a new tab with security attributes.
Use Item inside a menu or dropdown to display rich content in menu items.
PreviewCode
Open
Layout for list items with media, title, description, and actions. Use [--space:--spacing("value")] via className to control padding and gap. Supports asChild.
| Prop | Type | Default |
|---|---|---|
variant | `"default" | "outline" |
asChild | boolean | false |
className | string | - |
| Attribute | Default |
|---|---|
--space | --spacing(3) |
Groups related items with consistent spacing. Uses a fixed gap; adjust layout with className if needed. Has role="list" for accessibility.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Horizontal divider between items in a group.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Avatar, icon, or image for the item. Supports icon and image variants.
| Prop | Type | Default |
|---|---|---|
variant | `"default" | "icon" |
className | string | - |
asChild | boolean | false |
Wraps the item title and description text.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Primary title or heading for the item.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Secondary description or subtitle for the item.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Holds action buttons or controls.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Full-width header row above the item content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
Full-width footer row below the item content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
[
Previous page
Input ](/docs/components/input)[
Next page
Kbd ](/docs/components/kbd)
On This Page
InstallationAnatomyUsageVariantDefaultOutlineMutedCustom spacingExamplesIconAvatarImageGroupHeaderLinkDropdownAPI ReferenceItemItemGroupItemSeparatorItemMediaItemContentItemTitleItemDescriptionItemActionsItemHeaderItemFooter