List
Rows of related content with icons, captions, and secondary text.
Selected: Inbox
Installation
Terminal
pnpm dlx shadcn@latest add https://react-toolbox.io/r/list.jsonNew here? Set up your project first. Styles, fonts, and required components are included.
Usage
For actions or navigation, pass a native button or router link to itemContent to preserve keyboard access. Use ListCheckbox for rows with an independent selection control.
State and callbacks
selectable adds interaction feedback; your application owns selection. For ListCheckbox, update checked from onChange's next boolean.
API reference
Key props and defaults. Full types and inline documentation are included with the source in material/list.
List
| Property | Type | Default |
|---|---|---|
ripple | boolean | false |
selectable | boolean | false |
ListItem
| Property | Type | Default |
|---|---|---|
caption | ReactNode | — |
disabled | boolean | false |
itemContent | ReactNode | — |
legend | ReactNode | — |
Material guidelines
- Keep row content consistent and align icons, avatars, and text to common keylines. Use secondary text only when it helps distinguish items.
- The primary action occupies the row. Put separate secondary actions in their own controls, and provide focus and ripple feedback for interactive rows.
- Navigation rows use 14px medium labels; ordinary content lists use their own body-text metrics. Avoid treating every informational row as an action.