Skip to content
Native Animation
Swipe to Delete Row animation preview

react native swipe to delete

Swipe to Delete Row

A gesture-driven list row with growing actions and a satisfying collapse.

$9 for this animation

Add to your project

Copy the component and its assets into your app with the Native Animation CLI, or paste the agent prompt into Claude Code, Codex or Cursor once the MCP server is connected.

npx nativeanimation add swipe-to-delete-row

About this animation

React Native swipe to delete interactions should make intent visible before a destructive action commits. This list row follows a horizontal pan on the UI thread, reveals archive and delete actions, grows the delete icon with distance, and commits removal after the drag passes 60 percent. Use it for inboxes, task lists, saved items, notifications, or other collections where contextual actions need to stay close to the content. Reanimated closes and fades the row before the delete callback runs, while Gesture Handler keeps the drag responsive. Wrap any row content, customize action width and colors, handle archive and delete separately, or use the ref to reveal, close, remove, archive, delete, and reset the row programmatically.

When to use it

  • Delete tasks, messages, or saved items from a list.
  • Reveal archive and delete actions beside row content.
  • Require a deliberate drag before removal commits.
  • Open or close contextual actions programmatically.

A gesture-driven list row with growing actions and a satisfying collapse.

How it works

  1. A UI-thread pan shared value reveals contextual actions.
  2. The delete icon grows with the drag and commits past 60%.
  3. Delete fades and closes the row before calling onDelete.

Install

npx expo install react-native-gesture-handler react-native-reanimated

Usage

const rowRef = useRef<SwipeToDeleteRowRef>(null);

<SwipeToDeleteRow ref={rowRef} onDelete={remove} onArchive={archive}>
  <Task />
</SwipeToDeleteRow>;

rowRef.current?.reveal();
rowRef.current?.close();
rowRef.current?.remove();

The ref also keeps the earlier archive(), delete(), and reset() aliases for compatibility.

Props

PropTypeDefaultDescription
childrenReactNode—Row content.
onDelete() => void—Runs after collapse.
onArchive() => void—Runs after archive.
actionWidthnumber82Action width.
deleteColorstring'#F04452'Delete color.
archiveColorstring'#645BFF'Archive color.

Compatibility

Expo SDK 57, React Native 0.86, and Reanimated 4.5. iOS, Android, and web are supported but unverified on devices.

Accessibility

Both actions are labeled buttons. Reduced Motion shortens the removal transition.

FAQ

When does the swipe to delete action commit?
The delete action commits after the drag passes 60 percent. The row then fades and collapses before onDelete runs.
Can I reveal or remove the row without a swipe?
Yes. The forwarded ref exposes reveal, close, and remove, plus archive, delete, and reset aliases. Archive and delete are also presented as labeled buttons.
Is the swipe row verified on iOS, Android, and web?
Not yet. Its manifest lists all three platforms as supported but unverified. Reduce Motion shortens the removal transition while preserving the actions and callback sequence.