ListItem supplies the visual layout shared by list and menu rows. Use Menu or Select when you need their selection and keyboard behavior.
Anatomy
ListItem exposes content slots through props. These slots arrange content inside one row; they are not separately exported components.
The row supplies layout. Use
render to choose its element and semantics. For a row with independent action buttons, keep the row itself non-interactive so those buttons remain separate controls.
Action row
div. Use render to give an interactive row appropriate semantics, such as a button or link. hotkeys displays shortcut hints; your application must register the shortcuts.
Settings row
Use SettingsRow for a labeled switch row. It composesListItem and Switch, manages their accessible association, and applies disabled behavior to both.
Selection indicator
selected, focused, and disabled control row styling. The check and checkbox indicators are visual; use a real Checkbox for a form control. When using a disabled button or link through render, also supply the element’s appropriate disabled behavior and semantics.
Picker rows
Selection belongs to the parent.ListItem has no uncontrolled selection state: pass selected and update it from onClick. Use indicator="check" for a single choice and indicator="checkbox" for multiple choices. Both indicators are decorative and share the row’s click handler.
In an existing listbox, pass role="option" and aria-selected, and keep focus and arrow-key handling in the listbox. For a complete selection widget, use Select. Standalone selection buttons can use aria-pressed, as in these examples.
Single selection
Place an Avatar instartIcon to identify a record. Use description for supporting text, and descriptionPlacement="end" for a trailing value.
Multiple selection
Compose Tag as the row content for tagged values, or putColorSample in startIcon for a color choice. A row can also contain plain text or an avatar.
disabled to both the row and its rendered native button to prevent activation and remove it from the tab order.
Slots
UsestartIcon and endIcon for icons, description for supporting text, actions for trailing content, and hasSubmenu for a submenu indicator. descriptionPlacement accepts inline or end. color="danger" styles a destructive action. Avoid nesting interactive controls inside a row rendered as a button.
Props
The reference is generated from the public component types. Native attributes, including accessible names and event handlers, are also accepted on parts that render elements.ReactNode
Trailing content, such as buttons, rendered after the content.
"always" | "hover"
default:"hover"
When trailing actions are visible: on hover and focus, or always.
"danger" | "neutral"
default:"neutral"
Color of the text and icons.
danger marks a destructive action.ReactNode
Supporting text, placed according to
descriptionPlacement."end" | "inline"
default:"inline"
Where the description renders: inline after the content or at the end of
the row.
boolean
default:"false"
Prevents clicks and applies the disabled style.
ReactNode
Icon rendered after the content.
boolean
default:"false"
Applies the highlighted style, for example to the focused item of a list.
Shows a chevron indicating that the item opens a submenu.
string[]
Keyboard shortcut keys displayed at the end of the row. Registering the
shortcut is up to the application.
"check" | "checkbox" | "none"
default:"none"
Selection indicator: a check icon after the content or a checkbox before
it.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ListItemState>
Allows 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.boolean
default:"false"
Whether the item is selected. Shows the check or checkbox indicator when
indicator is set.ReactNode
Icon rendered before the content.