Item
Item represents a single record in a list, combining an icon or image with title, description, and optional actions. Use ItemGroup to compose multiple Items into a scannable list.
Use variant="outline" for separated cards and variant="muted" for a softer
row highlight. Use image media when the record is visually identified by a logo,
avatar, or product image.
Basic usage
Section titled “Basic usage”Code
<Item variant="outline"> <ItemMedia variant="icon"> <FileIcon /> </ItemMedia>
<ItemContent> <ItemTitle>Document.pdf</ItemTitle> <ItemDescription>Modified 2 hours ago</ItemDescription> </ItemContent>
<ItemActions> <Button variant="ghost" size="icon-sm" aria-label="More actions"> <MoreHorizontalIcon /> </Button> </ItemActions></Item>Code
<ItemGroup> <Item variant="outline"> <ItemMedia variant="icon"> <FileIcon /> </ItemMedia>
<ItemContent> <ItemTitle>Report.xlsx</ItemTitle> <ItemDescription>Yesterday</ItemDescription> </ItemContent> </Item>
<Item variant="outline"> <ItemMedia variant="icon"> <FileIcon /> </ItemMedia>
<ItemContent> <ItemTitle>Presentation.pptx</ItemTitle> <ItemDescription>Yesterday</ItemDescription> </ItemContent> </Item>
<Item variant="outline"> <ItemMedia variant="icon"> <FileIcon /> </ItemMedia>
<ItemContent> <ItemTitle>Budget.csv</ItemTitle> <ItemDescription>Yesterday</ItemDescription> </ItemContent> </Item></ItemGroup>Image Media
Section titled “Image Media”Code
<Item variant="muted"> <ItemMedia variant="image"> <img src="https://placehold.co/40x40" alt="Green Valley Farm" /> </ItemMedia>
<ItemContent> <ItemTitle>Green Valley Farm</ItemTitle> <ItemDescription>Preferred account · 12 open orders</ItemDescription> </ItemContent>
<ItemActions> <Button variant="outline" size="sm"> View account </Button> </ItemActions></Item>Sections
Section titled “Sections”Code
<ItemGroup> <Item size="sm"> <ItemHeader> <ItemTitle>ORD-1042</ItemTitle> <Badge variant="default">Confirmed</Badge> </ItemHeader>
<ItemContent> <ItemDescription>Green Valley Farm · $12,450.00</ItemDescription> </ItemContent>
<ItemFooter> <span className="tw:text-sm tw:text-muted-foreground"> Delivery Friday </span> <Button variant="ghost" size="sm"> Review </Button> </ItemFooter> </Item>
<ItemSeparator />
<Item size="sm"> <ItemContent> <ItemTitle>ORD-1043</ItemTitle> <ItemDescription> North Ridge Acres · awaiting confirmation </ItemDescription> </ItemContent> </Item></ItemGroup>| Name | Type/Description |
|---|---|
ref | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined |
render | ReactElement<any, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
size = "default" | "default" | "sm" | "xs" | null | undefined |
variant = "default" | "default" | "outline" | "muted" | null | undefined |
ItemActions
Section titled “ItemActions”No documented props
ItemContent
Section titled “ItemContent”No documented props
ItemDescription
Section titled “ItemDescription”No documented props
ItemFooter
Section titled “ItemFooter”No documented props
ItemGroup
Section titled “ItemGroup”No documented props
ItemHeader
Section titled “ItemHeader”No documented props
ItemMedia
Section titled “ItemMedia”| Name | Type/Description |
|---|---|
variant = "default" | "image" | "default" | "icon" | null | undefined |
ItemSeparator
Section titled “ItemSeparator”| Name | Type/Description |
|---|---|
className | string | ((state: SeparatorState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state. |
orientation = "'horizontal'" | Orientation | undefinedThe orientation of the separator. |
ref | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined |
render | ReactElement<any, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SeparatorState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. |
style | CSSProperties | ((state: SeparatorState) => CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state. |
ItemTitle
Section titled “ItemTitle”No documented props