Swipeable Row
Swipe-to-reveal actions, like Mail's swipe-to-delete, with a haptic tick at the open threshold.
Prerequisites
The gesture needs Reanimated and Gesture Handler installed and configured; expo install pins the versions that match your SDK.
npx expo install @hugeicons/react-native expo-haptics react-native-gesture-handler react-native-reanimated
Install
npx @rslab/cli add swipeable-row
Usage
import { SwipeableRow } from '@/components/ui/SwipeableRow';
import { Delete02Icon, Tick02Icon } from '@hugeicons/core-free-icons';
<SwipeableRow
actions={[
{ label: 'Done', color: '#22c55e', icon: Tick02Icon, onPress: complete },
{ label: 'Delete', color: '#ef4444', icon: Delete02Icon, onPress: remove },
]}
>
<View className="bg-white px-4 py-4 dark:bg-neutral-900">
<Text>Task title</Text>
</View>
</SwipeableRow>;Actions render right-to-left in array order, so the first entry sits closest to the row's edge once it's fully open.
Props
PropTypeDefault
childrenReactNode-The row's foreground content, any layout you want.
actions{ label: string; onPress: () => void; color?: string; icon?: HugeIcon }[]-Rendered right-to-left in array order behind the row.
actionWidth?number76Width in px of each action button.
disabled?booleanfalseDisables the swipe gesture entirely.
haptic?booleantrueSet false to mute the open-threshold tick.
className?string-Extend or override the outer wrapper.
See exactly how this works with an RSLAB subscription.
Get Pro