Tally UI
UI

ListRow

One flush row of a list, as in WCPOS v2, with a hairline under it and leading, body and trailing slots.

Import

import { ListRow } from '@tallyui/components';

Usage

<ListRow leading={<Avatar fallback="AL" size="md" />} trailing={<ChevronRightIcon className="text-muted-foreground" />} bodyClassName="gap-1" onPress={open}>
  <Text numberOfLines={1}>Ada Lovelace</Text>
  <Text numberOfLines={1} className="text-sm text-muted-foreground">ada@example.com</Text>
</ListRow>

size="sm" gives a one-line row the row height token (44 at Regular): <ListRow size="sm" onPress={open}><Text>Last closure</Text></ListRow>.

selected marks the current row of a list (open orders): true paints it bg-muted with a primary bar on its left edge, false keeps the bar's room.

Props

PropTypeDefaultDescription
leadingReactNode-Before the body: an avatar, a thumb, a check
trailingReactNode-After the body: an amount, a badge, a chevron
bodyClassNamestring-The body column's own layout (a gap-1 between its lines)
size'default' | 'sm''default'default (56) for a two-line data row; sm (44) for a one-line row or a dense list
selectedboolean-The current-row mark, announced as selected (checked on a radio or checkbox); unset, no bar
roleRolebutton with onPressUnset, a row without an action has no role and no tab stop
disabledbooleanfalseDims the row (opacity-45) and blocks presses
classNamestring-Additional classes merged via cn()

Plus all React Native PressableProps (onPress, onLongPress, testID, etc.).

The shared pressable surface follows in a later release.

On this page