Duolith docs

ListRow

One row of a list: a title, an optional subtitle, value and chevron, and leading and trailing content.

Stability: experimental

Props

PropTypeDefaultMeans
titlestringThe row's main text.
subtitlestringA second line, two lines at most.
valuestringA value at the trailing edge, such as the current setting.
iconstringA leading icon on a tinted tile.
chevronbooleanfalseA chevron at the trailing edge, for rows that open a screen.
destructivebooleanfalseThe title in the danger colour, such as Sign out.
disabledbooleanfalseA row that cannot be pressed or followed: a link row stops being a link, and the row is marked aria-disabled at 50% opacity.
hrefstringMakes the row a link to a route.
onPress() => voidMakes the row a button.

Pieces

PieceMeans
leadingContent before the title, such as an Avatar.
trailingContent at the trailing edge, such as a Badge or a toggle.

Children

Shown at the trailing edge, after the trailing piece.

States

StateLooks like
pressedA pressable row's background turns raised.
focusedThe focus outline.
disabled50% opacity.

Accessibility

rolebutton with onPress, link with href, otherwise none
nameThe row's text.
focusPressable and link rows are in the Tab order; plain and disabled rows are not.
keyboardEnter (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" />