- Accordion
- Alert Dialog
- Alert
- Autocomplete
- Avatar
- Badge
- Button Group
- Button
- Card
- Carousel
- Chart
- Checkbox
- Clipboard
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Editable
- Field
- File Upload
- Floating Panel
- Hover Card
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- QR Code
- Radio Group
- Rating Group
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Splitter
- Steps
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle Group
- Toggle
- Tooltip
- Tour
- Tree View
A simple item with title and description.
The Item component is a straightforward flex container that can house nearly any type of content. Use it to display a title, description, and actions. Group it with the ItemGroup component to create a list of items.
Installation
pnpm dlx shadcn@latest add @shark-ui/item
Usage
import { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle, } from "@/components/ui/item";
<Item> <ItemMedia /> <ItemContent> <ItemTitle /> <ItemDescription /> </ItemContent> <ItemActions /> </Item>
Item vs Field
Use <Field /> if you need to display a form input such as a checkbox, input, radio, or select.
If you only need to display content such as a title, description, and actions, use <Item />.
Variant
Use the variant prop to change the visual style of the item.
Outline
Outlined style with a visible border.
Muted
Muted background for secondary content.
Size
Use the size prop to change the size of the item.
Extra Small Size
A compact size for dense layouts.
Small Size
A compact size for dense layouts.
Examples
Icon
Use <ItemMedia /> with variant="icon" to display an icon.
New login detected from unknown device.
Avatar
You can use <ItemMedia /> with variant="default" to display an avatar.
PVLast seen 5 months ago
Invite your team to collaborate on this project.
Image
Use <ItemMedia /> with variant="image" to display an 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
Main component for displaying content with media, title, description, and actions. Renders a div (or the child element when asChild is true).
| Prop | Type | Default |
|---|---|---|
variant | default, outline, muted | default |
size | xs, sm, md | md |
asChild | boolean | false |
className | string | - |
ItemGroup
Container that groups related items with consistent spacing. Renders a div with role="list".
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemSeparator
Separator between items in a group. Renders a horizontal separator.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemMedia
Displays media (icon, image, or custom content) for the item. Renders a div.
| Prop | Type | Default |
|---|---|---|
variant | default, icon, image | default |
className | string | - |
asChild | boolean | false |
ItemContent
Wraps the title and description of the item. Renders a div.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemTitle
Displays the item title. Renders a div.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemDescription
Displays the item description. Renders a p.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemActions
Container for action buttons or other controls. Renders a div.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemHeader
Header above the item content (full-width row). Renders a div.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
ItemFooter
Footer below the item content (full-width row). Renders a div.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |