Put the row in SwipeActionsContent, and the actions in a tray per side.
mail-row.tsx
SwipeActions
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| open | null"leading""trailing" | — | The open tray (controlled). null is closed. |
| default | null"leading""trailing" | — | The tray that is open at first (uncontrolled). |
| on | — | ||
| disabled | boolean | — | No swipe and no trackpad swipe; the actions leave the Tab order. |
| full | boolean | — | A swipe past the commit point runs the primary action of that side. Default true. |
| on | — | Called after a dismiss action slid the row out and closed its height: remove the item. | |
| driver | — | Drives a swipe from code (DragDriver, no item): a staged scene or a test grabs the row, carries it, and lets go, and the row's own release rules open a tray, commit, or close. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
SwipeActionsContent
<div>SwipeActionsTray
<div>SwipeAction
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ref | Ref<HTMLButtonElement> | — | |
| tone | "destructive""info""neutral""primary""success""warning" | — | |
| primary | boolean | false | The action that a full swipe runs on its side (the edge one in a mail app). |
| dismiss | boolean | false | After onClick, slide the row out and call the root's onDismiss (a delete, an archive). |
| children | ReactNode | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>. |
SwipeActionsGroup
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves to the actions of a row. Focus on an action opens its tray. |
|---|---|
| EnterorSpace | Runs the focused action. |
| Esc | Closes the open tray and puts the focus back on the row. |











