Item

PreviousNext

A flexible item component for building lists, notifications, and content layouts with media, titles, descriptions, and actions.

Component item-demo not found in registry.

Installation

pnpm dlx shadcn@latest add item

Usage

import * as Item from "@/components/ui/item"
<Item.ItemGroup>
  <Item.Root>
    <Item.Media mediaVariant="icon">
      <MailIcon />
    </Item.Media>
    <Item.Content>
      <Item.Title>New message</Item.Title>
      <Item.Description>You have a new message from Sarah</Item.Description>
    </Item.Content>
    <Item.Actions>
      <Button.Root size="icon-sm" appearance="ghost">
        <TrashIcon />
      </Button.Root>
    </Item.Actions>
  </Item.Root>
</Item.ItemGroup>

Examples

Demo

Component item-demo not found in registry.

Variants

Component item-variants not found in registry.

Size

Component item-size not found in registry.

Icon

Component item-icon not found in registry.

Component item-link not found in registry.

Group

Component item-group not found in registry.

Props

Item.Root

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

variant
default
outline
muted
default
size
default
sm
default
mediaVariant
default
icon
image
default
asChild
boolean
false
className
string
-
children
ReactNode
-

Item.Media

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

mediaVariant
default
icon
image
default
as
ElementType
-
className
string
-
children
ReactNode
-

Item.Content

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

Item.Title

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

Item.Description

This component is based on the <p> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

Item.Actions

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

Item.Header

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

Item.Footer

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

ItemGroup

This component is based on the <div> element and supports all of its props.

Prop

Type

Default

className
string
-
children
ReactNode
-

ItemSeparator

This component is based on the <hr> element and supports all of its props.

Prop

Type

Default

className
string
-