Skip to main content
Version: v1.0.0

Migrate from react-native-actions-sheet

react-native-actions-sheet needs Reanimated, Worklets, Gesture Handler and Safe Area Context installed next to it. React Native Pickers' sheets use React Native core only, so there's nothing else to install or keep in step.

Despite its name, react-native-actions-sheet is a bottom sheet for any content. Your own content moves to BottomSheet. A sheet that only lists actions (Share, Edit, Delete) is shorter as an ActionSheet.

Code changes​

- import ActionSheet, { type ActionSheetRef } from 'react-native-actions-sheet';
+ import { BottomSheet } from '@elik56a/react-native-pickers';

- const ref = useRef<ActionSheetRef>(null);
- ref.current?.show();
+ const [open, setOpen] = useState(false);
+ setOpen(true);

- <ActionSheet ref={ref} gestureEnabled onClose={onClose}>
+ <BottomSheet visible={open} onClose={() => setOpen(false)} onClosed={onClose}>
<Filters />
- </ActionSheet>
+ </BottomSheet>

Props​

react-native-actions-sheetReact Native Pickers
ref.show() / ref.hide()visible, set to false in onClose
SheetManager.show(id, { payload }) / registerSheetrender the sheet where you use it, pass the payload as props
gestureEnabledenableSwipeToClose (default true)
closeOnTouchBackdropcloseOnBackdropPress
closeOnPressBackonClose is called on Android Back
snapPoints={[50, 100]}height={0.5} and expandedHeight={1}
onOpen / onCloseonOpened / onClosed, after the animation
containerStylestyles={{ sheet }}
indicatorStylestyles={{ handle }}
CustomHeaderComponent / headerAlwaysVisibletitle, headerLeft, headerRight
keyboardHandlerEnabledbuilt in
ScrollView / FlatList from the libraryReact Native's own, with a fixed height
isModal={false} (no backdrop, taps pass through)—
useSheetRouter (pages inside one sheet)—

See all migration guides for other libraries.