ContainedList

Labelled list of rows inside a bordered container

Category: display · WCAG 2.2-AA · list, container, rows, group

Variants

Props

PropTypeDefaultDescription
labelReactNodeText label for the control.
kind'on-page' | 'disclosed'on-pageVisual treatment — 'on-page' or 'disclosed'.
actionReactNodePrimary action shown in the component.

Design tokens

When to use

When not to use

How to build an accessible ContainedList in React →

Examples

Basic contained list

<ContainedList label="Members">
  <ContainedListItem>Ada Lovelace</ContainedListItem>
  <ContainedListItem>Alan Turing</ContainedListItem>
</ContainedList>

Interactive rows

<ContainedList label="Settings" kind="disclosed">
  <ContainedListItem asChild>
    <button type="button" onClick={open}>Profile</button>
  </ContainedListItem>
</ContainedList>

Related components

← Back to docs