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
- A UI-thread pan shared value reveals contextual actions.
- The delete icon grows with the drag and commits past 60%.
- Delete fades and closes the row before calling
onDelete.
Install
npx expo install react-native-gesture-handler react-native-reanimatedUsage
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
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Row content. |
onDelete | () => void | — | Runs after collapse. |
onArchive | () => void | — | Runs after archive. |
actionWidth | number | 82 | Action width. |
deleteColor | string | '#F04452' | Delete color. |
archiveColor | string | '#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.




