Genesis
@beta

NativeSwipeRow

NativeSwipeRow — a row with actions behind a swipe, as Mail and Messages have them: leading actions behind a swipe to the right (Read, Pin), trailing behind a swipe to the left (Archive, Delete). Each action's `swipe` (`{ side, full }`, trailing by default), `icon`, `tone` and `accent` come from the one row-action shape (`RowSwipeAction` in `genesis-core/row-actions`, ADR 0028), so a view's actions, an inbox row's and an app's own list read the same. - **Full swipe:** the first `full` action on a side runs when the row is let go past `fullSwipeRatio` (0.6) of its width on that side, as Mail's Delete does (`fullSwipeSide`). - **Appearance:** `"fill"` draws each action as a colored block with its icon and label; `"round"` draws iOS 26's round icon buttons (50pt, 10pt apart) with the label under them, and while they're open the row itself becomes a pill (systemGray5, inset 6pt), as Messages does. - **Screen readers:** the buttons behind the row are hidden from VoiceOver (a screen reader doesn't swipe); the same actions go on the row as `accessibilityActions` instead (and so Maestro and XCUITest can run them), unless `accessibilityActions={false}` says the row already has them (InboxPage, NativeResourceView). - An action with `swipe: false` stays off the swipe (the long-press menu and the screen reader still offer it). The gesture is the app's `GenesisModules.swipeable` (react-native-gesture-handler's `ReanimatedSwipeable`, an optional peer). Without it the row draws as it is and its actions stay reachable as accessibility actions; put them on long press too (`NativeRowActions`, or a `NativeListItem`'s `actions`, does both). A swipe that opens taps `medium` through `useHaptics`.

packages/ui-native/src/components/swipe-row.tsx

Import
Subpath export: @marktiderman/genesis-ui-native
import { NativeSwipeRow } from "@marktiderman/genesis-ui-native";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

createSwipePressGuard

Tells NativeSwipeRow's row whether its press is a real one. Not while the row is open; not when a drag started after the touch did (gesture-handler's start of a drag, which can come just after the release); and, for a touch it didn't see start, not within `SWIPE_PRESS_HOLD_MS` of a drag that reported no end. It reads the Swipeable's own callbacks and a touch's start, and never takes the touch, so the swipe always gets its gesture.

No declared props.

openWidth

The width a side's `n` actions open to: fill buttons side by side, or round ones with their gaps.

No declared props.

splitSwipeActions

The actions a swipe shows, by side (an action with `swipe: false` shows on neither), in the row's reading direction.

No declared props.

rowAccessibilityActions

The row's actions as React Native's `accessibilityActions` and the handler that runs them: the one place they're built (`useRowActions` and NativeSwipeRow use it). A refused action's label carries its reason, so a screen reader hears why before pressing it.

No declared props.

fullSwipeSide

Whether a release runs a side's full-swipe action. `dx` is the row's offset as the release is reported (the latest UI-thread value, so the finger's position, not the furthest it went: a drag that backs out, or crosses to the other side, doesn't run it). `direction` is where the row is opening, as gesture-handler 2.21 and later name it: `"right"` when the row moves right and uncovers the left-hand actions (2.20 and earlier named it the other way, so the peer range starts at 2.21). The offset must be on that side (a release flung across to the other side opens that side and runs nothing), and further than the side's open actions (`open`, their width) by `FULL_SWIPE_CLEARANCE`. The report comes a frame or so after the finger lifts, so a release right at the threshold can land either side of it.

No declared props.

NativeSwipeRow

PropTypeDefaultDescription
actions*readonly RowSwipeAction[]—
accessibilityActionsbooleantruePut the actions on the child as `accessibilityActions` (merged into its own, when it's a single element). Default `true`; pass `false` when the row already has them.
appearanceenumfill`"fill"` (colored blocks, the default) or `"round"` (iOS 26's round icon buttons).
fullSwipeRationumber0.6How far across the row (a share of its width) a drag runs the side's `full` action when let go. Default 0.6, as iOS.
maxPerSidenumber3At most this many actions on a side; the rest stay in the menu and the screen reader's actions. Default 3, as Mail.
roundLabelsbooleantrueRound buttons: the label under each circle. Default `true`; `false` draws the circles alone, as Messages does, and each button keeps its label as its accessibility label.
testIDstringswipe-row

SWIPE_PRESS_HOLD_MS

How long a drag that started counts as swiping when gesture-handler reports no end, in ms.

No declared props.

FULL_SWIPE_CLEARANCE

How far past a side's open actions a full swipe must go, in points.

No declared props.

SWIPE_METRICS

The swipe's measurements, in points: what a side opens to (`openWidth`) and what the buttons draw with come from here, so the two never disagree.

No declared props.

fillWidth

A fill button's width: room for a short label.

No declared props.

roundSlot

A round button's slot (its circle and label) and the circle inside it (iOS 26's 50pt).

No declared props.

roundGap

The space between round buttons, and at the side's edges.

No declared props.

pillInset

The open row as a pill: its inset from the row's edges and its corner radius.

No declared props.