React Swipe Actions – Swipe-to-Delete & Gesture Reveal Rows
Gesture-driven swipe action rows for React with touch scroll locking, rubber-band resistance, snap thresholds, and full keyboard action buttons.
- M
Mara Santos
Pricing page feedback
- D
Deploy bot
Build 482 passed
- J
Jun Reyes
Can we ship Friday?
- M
Mara Santos
Pricing page feedback
- D
Deploy bot
Build 482 passed
- J
Jun Reyes
Can we ship Friday?
Live vector preview rendered straight from the same 120 Hz spring engine—no heavy GIF compression artifacts, zero layout shift.
Customization playground
Tune outline, fill, accent, text colour, and shadow direction live above. The snippet updates automatically for copy-and-paste.
Customize
<SwipeAction />Installation
Install directly into your project source with the Kipluo CLI (React/Tailwind v4) or add the matching Flutter package.
Install
$ npx kipluo add swipe-actionWorking code example
import { SwipeAction } from "@/components/kipluo/swipe-action";
export function InboxRow({ id, subject }: { id: string; subject: string }) {
return (
<SwipeAction
onArchive={() => console.log("Archive", id)}
onDelete={() => console.log("Delete", id)}
>
<div className="p-4 font-medium">{subject}</div>
</SwipeAction>
);
}What Swipe Action does
- Locks gesture intent on the first few pixels of pointer movement so vertical list scrolling never accidentally triggers a horizontal row swipe.
- Reveals contextual Archive or Delete actions smoothly behind the row with spring resistance past the snap detent.
- Pairs every gesture with an accessible focusable Actions button so desktop keyboard and screen-reader users have identical functionality.
Accessibility & sound behavior
Keyboard & screen readers: Each row has an actions button that opens the same actions as a menu; Escape closes any open row.
Reduced motion: Automatically respects prefers-reduced-motion: reduce by snapping spring targets immediately without jarring travel.
Sound cues: A swipe when actions are revealed, a tick as you cross the archive line, a swish and a water drop when a row is archived. Disable per instance with sound={false} or globally via setSoundEnabled(false).
API reference
actionsSwipeActionItem[]- Buttons revealed under the row. Default
Archive / Delete. fullSwipeboolean- A long swipe expands and runs the first action directly. Default
true. directionLocknumber- Pixels before the gesture decides horizontal or vertical. Default
8. soundboolean- Plays this component's sounds. The global switch setSoundEnabled(false) silences every component. Default
true.
Framework compatibility
| Platform / Tool | Status | Details |
|---|---|---|
| React 18 & 19 | Full support | Zero peer runtime lock-in beyond @kipluo/core. |
| Next.js App Router | Full support | Ships with 'use client' boundaries; SSR-safe hydration. |
| Vite / Remix / Astro | Full support | Standard ESM TypeScript source files you own. |
| Tailwind CSS v4 & shadcn/ui | Native | Inherits CSS variables and installs via shadcn registry or CLI. |
| Flutter (Dart) | Native package | Matching spring physics, themes, and PCM audio in packages/flutter/kipluo. |
Build it yourself: related tutorials
All tutorials →How to Implement Swipe-to-Delete in React
Learn how to build accessible swipe-to-delete rows in React with axis locking, rubber-band drag resistance, snap thresholds, and desktop keyboard fallbacks.
How to Create Interactive Dragging with Pointer Events
Master unified mouse, touch, and pen dragging in React using setPointerCapture, touch-action, velocity sampling, and clean pointercancel recovery.
How to Handle Interrupted Animations in React
Learn why rapid clicks, mid-flight drags, and unmounts break React animations—and how velocity-preserving springs and proper cleanup make them unbreakable.
Related components
- Open component →Hold to ConfirmFree
Press and hold to fill the ring and commit a destructive action. Letting go early snaps back cleanly and never fires.
- Open component →Spring Drawer HandleFree
Pullable sheet handle with rubber-band overscroll, three magnetic snap detents (Peek, Half, Full), and a velocity-projected throw that settles with a soft click on every lock.
- Open component →Physics Card StackPaid
Drag or fling the top card from anywhere on its face. Behind cards rise as you pull; past the threshold it arcs out and tucks behind the stack.
- Open component →Sortable ListPaid
Drag handles lift the active item while neighbors displace smoothly via FLIP springs. Full keyboard reordering included.
- Open component →Pull to RefreshPaid
Rubber-band overscroll from the top edge with an audible threshold detent, async loader handoff and clean unmount abort.
- Open component →Bottom SheetPaid
A mobile sheet with peek, half and full snap points. A flick projects where it would land; past full it rubber-bands; once full, the content scrolls and a pull at the top drags the sheet down again.