Overview
A ListCell row is divided into the following 5 columns:
- Media
- Title & description
- Intermediary
- End (detail & subdetail or action)
- Accessory
Basic Usage
Prefer spacingVariant="condensed" for the new ListCell design. Both normal and compact are deprecated and may be removed in a future major release.
Spacing Variant
Media
We have deprecated CellMedia; pass media directly as shown below.
Leading Icon
Leading Avatar
Title & Description
Title Line Limits
- In condensed spacing (
spacingVariant="condensed"), the title shows up to two lines by default, regardless of whether a description is present. - In normal and compact spacing, the title shows up to two lines when there is no description; if a description is present, the title is limited to one line.
- Use
disableMultilineTitleto force the title to one line in all cases. - When provided, the subtitle renders between the title and description and always truncates to a single line. Use
subtitleNodeif you need custom layout or multi-line behavior.
The title and description props are rendered inside a CDS Text with default fonts and truncation. To render arbitrary React nodes without being wrapped by a <Text>, use titleNode and descriptionNode.
When using the Node props, you are responsible for styling, layout, and truncation behavior.
Custom Title/Description via Node Props
Subtitle
Use subtitle to add one line of supplementary context between the title and description. The subtitle always truncates to a single line; provide a subtitleNode when you need your own truncation or layout logic.
Multiline Description
Intermediary
End
Detail and Subdetail
Like title and description, detail and subdetail props are also rendered inside a CDS Text with default fonts. To render arbitrary React nodes without being wrapped by a <Text>, use detailNode and subdetailNode.
Custom Detail/Subdetail via Node Props
End Action
When you pass the end prop, it overrides the detail/subdetail/detailNode/subdetailNode.
Accessory
Interactive Cell with Accessory
Preserve Layout During Selection
Use the unselected accessory to reserve space for the selection checkmark when toggling the selected state.
Custom Accessory via Node Prop
Accessibility Label
The accessibility props are only applied when the <ListCell> has a value for the onClick prop. Otherwise, content passed into the <ListCell> must use accessibility props and attributes as needed.