ListRow
One row of a list: a title, an optional subtitle, value and chevron, and leading and trailing content.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
title | string | The row's main text. | |
subtitle | string | A second line, two lines at most. | |
value | string | A value at the trailing edge, such as the current setting. | |
icon | string | A leading icon on a tinted tile. | |
chevron | boolean | false | A chevron at the trailing edge, for rows that open a screen. |
destructive | boolean | false | The title in the danger colour, such as Sign out. |
disabled | boolean | false | A row that cannot be pressed or followed: a link row stops being a link, and the row is marked aria-disabled at 50% opacity. |
href | string | Makes the row a link to a route. | |
onPress | () => void | Makes the row a button. |
Pieces
| Piece | Means |
|---|---|
leading | Content before the title, such as an Avatar. |
trailing | Content at the trailing edge, such as a Badge or a toggle. |
Children
Shown at the trailing edge, after the trailing piece.
States
| State | Looks like |
|---|---|
pressed | A pressable row's background turns raised. |
focused | The focus outline. |
disabled | 50% opacity. |
Accessibility
| role | button with onPress, link with href, otherwise none |
| name | The row's text. |
| focus | Pressable and link rows are in the Tab order; plain and disabled rows are not. |
| keyboard | Enter (and Space for a button) activates it. |
Theme tokens
color.surface color.raised color.ink color.muted color.primary color.danger space.3 space.4 radius.sm text.body text.caption
Example
<ListRow title="Wi-Fi" icon="wifi" value="Home" chevron href="/wifi" />