A section label for organizing groups within a list. Headers use the same unframed treatment as the rest of the list.
| Prop | Type | Default | Description |
|---|---|---|---|
| headline | string | Required | Header text |
| body | string | - | Optional secondary text |
| highlight | boolean | false | Use the accent text color |
| icon | IconType | - | Context-colored content icon |
| iconPosition | Position | "start" | Position of the icon |
| iconSize | Size | "medium" | Size of the icon |
| addOn | ReactNode | - | Trailing status or action |
<List ariaLabel="Example sections">
<ListHeaderItem headline="Section A" />
<ListItem headline="Item 1" body="Description" />
<ListItem headline="Item 2" body="Description" />
<ListHeaderItem headline="Section B" />
<ListItem headline="Item 3" body="Description" />
</List>
Use highlight to draw attention with the accent text color. The header remains unframed and does not add a background.
<ListHeaderItem
headline="Documents"
icon="folder"
/>
<ListHeaderItem
highlight
headline="Needs attention"
icon="circle-alert"
/>
<List ariaLabel="Settings">
<ListHeaderItem headline="Account" />
<ListButtonItem headline="Profile" onClick={() => {}} />
<ListButtonItem headline="Password" onClick={() => {}} />
<ListHeaderItem headline="Preferences" />
<ListButtonItem headline="Theme" onClick={() => {}} />
<ListButtonItem headline="Language" onClick={() => {}} />
<ListHeaderItem headline="Danger zone" highlight />
<ListButtonItem
headline="Delete account"
color="negative"
onClick={() => {}}
/>
</List>
<List ariaLabel="Contacts">
<ListHeaderItem headline="A" />
<ListItem headline="Alice Anderson" />
<ListItem headline="Andrew Adams" />
<ListHeaderItem headline="B" />
<ListItem headline="Bob Brown" />
<ListItem headline="Betty Baker" />
</List>