SwipeUI

List row

A row for lists and settings screens with a title, subtitle, leading and trailing content, and an optional chevron.

npx @swipeui/cli add list-row
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When to use it

  • Settings screens with rows like Notifications, Privacy and Account.
  • Lists of contacts, files or messages with a title and subtitle.
  • Rows with a value or a Switch on the end.
  • Rows that reveal swipe actions such as Archive or Delete.

When not to use it

  • Rich content with images and actions. Use Card.
  • Expanding content. Use Accordion.
  • Grids of items. Use Feature tile or a grid.

Installation

Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.

npx @swipeui/cli add list-row
  • Adds components/swipeui/ui/list-row.tsx and 7 shared helpers.
  • Installs clsx, tailwind-merge, react-native-reanimated, react-native-worklets, uniwind, expo-haptics, class-variance-authority, react-native-gesture-handler. In Expo apps it uses npx expo install so versions match your SDK.

Usage

app/settings.tsx
import { ListRow } from '@/components/swipeui/ui/list-row';

<ListRow title="Notifications" subtitle="Banners, sounds and badges" onPress={openNotifications} />
<ListRow title="Dark mode" trailing={<Switch accessibilityLabel="Dark mode" />} />

Group rows in a bordered container:

app/settings.tsx
<View className="overflow-hidden rounded-lg border border-border">
  <ListRow title="Account" onPress={openAccount} />
  <ListRow title="Privacy" onPress={openPrivacy} />
</View>

API reference

PropTypeDefaultDescription
trailingAlignment?"center" | "top"'center'

Align the trailing slot with the top text line.

showSwipeActionButtons?booleantrue

Show persistent swipe action alternatives. Accessibility actions remain.

swipeActionLayout?"below" | "inline"'inline'

Keep non-gesture swipe alternatives beside or below the row.

appearance?"filled" | "plain"'plain'

Resting surface; grouped rows normally stay plain.

density?"compact" | "regular"'regular'

Vertical spacing; both retain a 44pt minimum.

startActions?readonly SwipeAction[]—

Actions at logical start, also exposed as named buttons.

endActions?readonly SwipeAction[]—

Actions at logical end, also exposed as named buttons.

fullSwipe?booleantrue

Whether a full swipe commits.

onSwipeError?((error: unknown) => void)—

Receives asynchronous swipe failures.

titlestring—

The main line. It names the row for screen readers even when titleContent draws it.

titleContent?ReactNodeundefined

Draws the main line instead of the plain title, such as a search match highlighted inside it. title still provides the spoken name.

subtitle?string—

A second, quieter line.

leading?ReactNode—

Shown before the text, such as an icon or Avatar.

trailing?ReactNode—

Shown after the text, such as a value, Badge or Switch.

chevron?booleantrue when `onPress` is set

Shows a chevron at the end, pointing the reading direction.

onPress?((event: GestureResponderEvent) => void)—

Makes the row pressable, announced as a button.

disabled?booleanfalse

Prevent primary and swipe activation.

haptics?booleantrue

Plays a selection tick on press.

motion?MotionOverridethe app feel

Local motion feel or spring override.

accessibilityLabel?string—

Overrides the label read by screen readers for pressable rows (title and subtitle by default).

accessibilityHint?string—
className?string—

Classes merged over the row.

style?StyleProp<ViewStyle>—

Style escape hatch for the row.

testID?string—

Composition and behavior

  • title and subtitle text with leading and trailing slots.
  • onPress makes it a button; chevron shows the arrow.
  • startActions, endActions and fullSwipe add Swipe actions.

Behavior and gestures

  • With onPress, tap the row to open it; it gives a gentle press and a selection tick, and shows a chevron by default.
  • Without onPress, the row is plain content and controls in trailing work on their own.
  • With startActions or endActions, swipe the row to reveal actions.
  • Disabled rows dim and ignore taps.

Accessibility

  • A tappable row is one button named by its title and subtitle, such as "Notifications, On".
  • The chevron is hidden from screen readers and points the other way in right-to-left layouts.
  • Without onPress, the row isn't grouped, so a Switch in trailing stays reachable on its own.
  • Swipe actions are also available as named buttons and accessibility actions.

Motion

  • Uses the press motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • Uses the shared press scale; swipes use the drag spring.
  • Reduce Motion removes the scale.

Performance

  • Light enough for long FlatLists.

Notes for AI

  • Don't put a pressable control in trailing of a pressable row; two nested buttons confuse screen readers.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items