# Swipe actions

A React component in [Beamline](https://beamline.io/)'s [Actions](https://beamline.io/components/actions) category. Live demo: https://beamline.io/components/swipe-actions

Row actions behind a swipe on touch screens, mirrored in a menu at the row's end for pointer and keyboard; a full swipe runs the edge action.

## Use it for

- Row actions in lists on touch screens: archive, delete, flag.

## Not for

- Desktop-only tables (a [dropdown-menu](https://beamline.io/components/dropdown-menu) or [context-menu](https://beamline.io/components/context-menu) on the row).

## Anatomy

- row
- leading actions
- trailing actions
- menu button (mirror)

## Variants

- **tone**: danger, accent, neutral, success

## States

- closed
- dragging
- open start
- open end
- full swipe

## Keyboard

- The ⋯ menu holds every action
- revealed action buttons are reachable only while shown

## Motion

Follows the finger 1:1 and resists past the actions; settles on --pui-ease-drawer. Works in both reading directions.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | — |  |
| `leading / trailing` | `{ id, label, icon, tone?, onAction }[]` | — |  |
| `children` | `ReactNode` | — |  |
| `style / ref` | `CSSProperties / native Ref` | — |  |
| `classNames` | `SwipeActionsClassNames` | — |  |

## Dependencies

`lucide-react`

## Import

```tsx
import { SwipeActions } from "@/components/swipe-actions/swipe-actions";
```

## Get it

Swipe actions is part of Beamline: 190 React components and screens your coding agent (Claude Code, Codex, Cursor or any MCP client) installs into your app through Beamline's MCP server, as a ready-built package or as plain React source you can change. $49 one payment (regular $200), no subscription, a year of updates, one licence for your whole team. [Get Beamline](https://beamline.io/checkout?pack=complete) · [Connect your agent](https://beamline.io/connect)

## More in Actions

- [Button](https://beamline.io/components/button): The action control: five weights and a brand fill, a buy/sell tone, sm/md/lg and a 44 px touch size, icon-only, a loading state that keeps its size and…
- [Confirm morph](https://beamline.io/components/confirm-morph): A destructive action that asks in place: the button morphs into its question, then into working, then into the result with Undo or Retry, without a dialog.
- [Copy button](https://beamline.io/components/copy-button): Copies a value and confirms in place: the icon becomes a check and the label says Copied; a refused copy says so instead of pretending.
- [Hold to confirm](https://beamline.io/components/hold-to-confirm): Confirms a costly action by holding instead of clicking: a fill sweeps across while held and drains if let go early; pointer, touch, Space and Enter all…
- [Split button](https://beamline.io/components/split-button): One obvious action joined to a menu of close alternatives; both halves are real buttons and the menu uses the shared menu rows.
- [Theme switch](https://beamline.io/components/theme-switch): The light/dark control: the page changes in one of four transitions starting from the button (reveal, eclipse, split, rise), and the icon turns between…
