On this page
Item
A bordered row for lists of accounts, organizations and settings: media, a label and description, and trailing actions. Every part takes render and forwards its ref.
Use for
- a row in a list of accounts, organizations or settings
- a clickable row that links or acts, with
render - a row with trailing buttons or a badge
Practices
| Guidance | Practice |
|---|---|
| Do | Pass render with a link or button to make the row interactive. Only then does it gain hover and a pointer cursor. |
| Do | Use variant='interactive' on Item.Label when the text is the action, such as Sign out, so it brightens with the row. |
| Do | Stack rows in Item.Group. |
| Don’t | Build a radio choice from Item. Use Radio.Card instead. |
API reference
Item.Root
The row. Renders a div, or the render element, which carries data-interactive.
Slot: cl-item
Item.Media
A square column that centers an icon, image, avatar or spinner.
Slot: cl-item-media
Item.Content
Stacks the label and description, and grows to fill the row.
Slot: cl-item-content
Item.Label
The row label, cut to one line. Inside a Field it labels the control.
Slot: cl-item-label
| Prop | Type | Description |
|---|---|---|
variant | LabelVariant | default sets its own color for a subject the row names. interactive takes the row color, so it follows the row hover.Default: 'default' |
Item.Description
Secondary text below the label, cut to one line. Inside a Field it describes the control.
Slot: cl-item-description
Item.Actions
Trailing controls, such as buttons or badges.
Slot: cl-item-actions
Item.Group
A spaced vertical stack of rows. Layout only.
Slot: cl-item-group
Examples
A linked row
<Item.Root render={({ children, ...props }) => <a {...props} href='/org'>{children}</a>}>
<Item.Media><Avatar.Root size='fit'>…</Avatar.Root></Item.Media>
<Item.Content><Item.Label>Clerk</Item.Label></Item.Content>
</Item.Root>