- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Item
A versatile component for displaying content.
A simple item with title and description.
Installation#
pnpm dlx shadcn@latest add @shark/item
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#
Transparent background with no border.
Outline#
Outlined style with a visible border.
Muted#
Muted background for secondary content.
Custom spacing#
The [--space:--spacing("value")] on ItemContent controls the internal spacing.
Default spacing is --spacing(3).
Uses `[--space:--spacing(2)]` for tighter padding and gap.
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)]
Examples#
Icon#
New login detected from unknown device.
Avatar#
PVLast seen 5 months ago
Image#
Electric Nights · Neon Dreams · 3:45
Urban Stories · The Morning Brew · 4:05
Binary Beats · Cyber Symphony · 3:30
Group#
Use ItemGroup to group related items together.
vvinihvc@example.com
ssegunadebayo@example.com
ppasqualevitiello@example.com
Header#
Use ItemHeader to add a header above the item content.
Everyday tasks and UI generation.
Advanced thinking or reasoning.
Open Source model for everyone.
Link#
Use the asChild prop to render the item as a link. The hover and focus states will be applied to the anchor element.
Dropdown#
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.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "outline" | "muted" | "default" |
asChild | boolean | false |
className | string | - |
| Attribute | Default |
|---|---|
--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.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemSeparator#
Horizontal divider between items in a group.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemMedia#
Avatar, icon, or image for the item. Supports icon and image variants.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "icon" | "image" | "default" |
className | string | - |
asChild | boolean | false |
ItemContent#
Wraps the item title and description text.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemTitle#
Primary title or heading for the item.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemDescription#
Secondary description or subtitle for the item.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemActions#
Holds action buttons or controls.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemHeader#
Full-width header row above the item content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemFooter#
Full-width footer row below the item content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |