List
Data displayshadcn/uiVertical rows of related items (transactions, settings, contacts) with leading, title, description and trailing slots.
When to use
- Put lists inside a surface Card for grouped sections.
- Right-align amounts and use font-mono tabular numbers for money.
- Show an EmptyState instead of an empty list.
- Don't mix interactive and static rows in one list.
- Don't put two actions in one row; use a Menu.
Accessibility
- Role
- list / listitem
- Keyboard
- Interactive rows are buttons: Tab to focus, Enter or Space to open.
- Notes
- Trailing controls like Switch must have their own accessible label.
Props
List.inset= truebooleanInset dividers.
ListItem.titleReactNodeMain text.
ListItem.descriptionReactNodeSecondary text.
ListItem.leadingReactNodeLeading visual.
ListItem.trailingReactNodeTrailing value or control.
ListItem.interactive= falsebooleanRow is a button.
Prompt for your agent
Use the UnbuiltUI List. Call unbuilt_get_component("List") first and follow its spec: variants, states, usage rules and accessibility.
unbuilt_get_component returns
4 variants5 states6 props5 usage rules2 a11y notes6 tokens1 example
Add it with shadcn
$
npx shadcn add https://unbuiltui.com/r/list.jsonTokens · 6
fg.defaultfg.mutedborder.subtlebg.subtleborder.focusradius.md