NativeRowActions
NativeRowActions — a row's actions offered the three ways iOS offers them, from one list (ADR 0028): behind a swipe (`NativeSwipeRow`), in the long-press menu, and as the screen reader's actions. Wrap any pressable row in it. `NativeListItem`'s `actions`, InboxPage's rows and NativeResourceView's rows and cards build theirs the same way (`useRowActions`), so a row behaves the same everywhere. The long press opens the system context menu (UIContextMenu, the row lifted as its preview) when the app passes `GenesisModules.menu` (`MenuView` from `@expo/ui/community/menu`), and `NativeContextMenu`'s sheet otherwise; `renderMenu` puts a screen's own menu in their place. Every action shows in the menu, `swipe: false` ones included; a refused one is still listed, and pressing it explains (its `onPress`).
packages/ui-native/src/components/row-actions.tsx
@marktiderman/genesis-ui-nativeimport { NativeRowActions } from "@marktiderman/genesis-ui-native";react-docgen-typescript.NativeRowActions
| Prop | Type | Default | Description |
|---|---|---|---|
| actions* | readonly RowSwipeAction[] | — | |
| children* | ReactNode | — | The row: one pressable element, which gets the long press and the accessibility actions. |
| appearance | enum | — | The swipe's look: `"fill"` or iOS 26's `"round"`. |
| preview | (() => ReactNode) | — | A peek of the row above its long-press menu (a conversation's latest messages). The system menu from `GenesisModules.menu` can't draw one, so with a preview the long press opens `NativeContextMenu`'s sheet, the peek on top. |
| renderMenu | ((props: RowActionsMenuProps) => ReactNode) | — | The long press opens this menu of the screen's own instead of the sheet or the system menu (`RowActionsMenuProps`). |
| testID | string | row-actions | |
| title | string | — | What the actions act on: the menu's title (the row's title). |
NativeSystemMenuRow
A row inside the system context menu (`GenesisModules.menu`). The menu's host sizes itself to its content, which would shrink a row that only stretches: so the row is given its measured width once it's known.
| Prop | Type | Default | Description |
|---|---|---|---|
| actions* | readonly RowSwipeAction[] | — | |
| Menu* | GenesisMenuComponent | — | |
| testID* | string | — | |
| title | string | — |
toMenuAction
A row action as the system menu takes it: its SF Symbol, and destructive in red.
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | — | |
| label* | string | — | |
| onPress* | () => void | — | |
| accent | enum | — | A system color by name, over `tone` (see {@link RowActionAccent}). |
| confirms | boolean | — | Its `onPress` asks first or can be undone, so a full swipe that runs it by mistake loses nothing. |
| destructive | boolean | — | Destructive (delete, leave): `danger` unless a `tone` or `accent` says otherwise. |
| icon | string | — | A Genesis icon name (`trash`, `pin`, `mail-open`), shown behind the swipe and in the menu. A string here, because core is platform-neutral and each platform keeps its own icon set: genesis-ui-native's `NativeIconName` and `isNativeIconName` check it on the phone (an unknown name draws no icon, with a development warning). |
| reason | string | — | Set when a guard refuses it: pressing it explains instead of acting, and screen readers hear why. |
| side | enum | — | @deprecated Use `swipe: { side }`. Read when `swipe` is unset. |
| swipe | false | RowActionSwipe | — | Where it sits behind the swipe on the phone: `{ side, full? }`, or `false` to keep it in the long-press menu and the screen reader's actions only (an action that needs a second look). Unset: the trailing side, no full swipe (NativeResourceView keeps a view action that didn't say to its menu). |
| tone | enum | — | What it means; its color comes from that. Default `danger` when destructive, else `tint`. |