Item
A flexible list item component with media, content, actions, and variants.
displaylayoutlist
Loading preview...
Installation
npx baseui-cn add itemUsage
import {
Item,
ItemMedia,
ItemContent,
ItemActions,
ItemGroup,
ItemTitle,
ItemDescription,
} from "@/components/ui/item"
<ItemGroup>
<Item>
<ItemMedia variant="icon">
<FileIcon />
</ItemMedia>
<ItemContent>
<ItemTitle>File name</ItemTitle>
<ItemDescription>Description text</ItemDescription>
</ItemContent>
<ItemActions>
<Button size="sm">Action</Button>
</ItemActions>
</Item>
</ItemGroup>
Examples
Basic
Simple items with title and description in a group.
Loading preview...
With media
Items with avatar icons and status indicators.
Loading preview...
With image
Items featuring product images.
Loading preview...
Variants
Default, outline, and muted item styles.
Loading preview...
With header and footer
Rich item layout with header actions and footer interactions.
Loading preview...
Sizes
Items in default, sm, and xs sizes.
Loading preview...
API
Item
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "outline" | "muted" | "default" | Border and background treatment of the item row |
size | "default" | "sm" | "xs" | "default" | Padding and gap scale |
ItemMedia
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "icon" | "image" | "default" | "icon" sizes the SVG; "image" adds fixed dimensions and overflow-hidden for thumbnails |