Skip to content
esc

List

Data displayshadcn/ui

Vertical 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= true

    boolean

    Inset dividers.

  • ListItem.title

    ReactNode

    Main text.

  • ListItem.description

    ReactNode

    Secondary text.

  • ListItem.leading

    ReactNode

    Leading visual.

  • ListItem.trailing

    ReactNode

    Trailing value or control.

  • ListItem.interactive= false

    boolean

    Row 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.json

Tokens · 6

fg.defaultfg.mutedborder.subtlebg.subtleborder.focusradius.md