Item

A flexible list item component with media, content, actions, and variants.

displaylayoutlist
Loading preview...

Installation

Terminal
npx baseui-cn add item

Usage

Code
import {
  Item,
  ItemMedia,
  ItemContent,
  ItemActions,
  ItemGroup,
  ItemTitle,
  ItemDescription,
} from "@/components/ui/item"
Code
<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...

Rich item layout with header actions and footer interactions.

Loading preview...

Sizes

Items in default, sm, and xs sizes.

Loading preview...

API

Item

PropTypeDefaultDescription
variant"default" | "outline" | "muted""default"Border and background treatment of the item row
size"default" | "sm" | "xs""default"Padding and gap scale

ItemMedia

PropTypeDefaultDescription
variant"default" | "icon" | "image""default""icon" sizes the SVG; "image" adds fixed dimensions and overflow-hidden for thumbnails

Interactive Item compositions use one solid 2px keyboard outline. Keep a meaningful link or button in render when the whole row performs an action.

For manual installation, copy the stylesheet included with the component source and retain its import. CLI installation includes it automatically; website CSS is not required.