How do I make the BottomSheetModal show above the native Modal #2081
Replies: 5 comments 3 replies
-
| I'm also trying to figure this out, but in my case, I want it to overlay my custom bottom navigation, which is positioned absolutely. |
Beta Was this translation helpful? Give feedback.
-
Try adding another inside of your modal, so something Like ... . I think in theory bottom sheet modal is looking for the first modal provider so you won't get two modals opening. |
Beta Was this translation helpful? Give feedback.
-
| I was having the same scenario, it work after I wrap my native Modal with |
Beta Was this translation helpful? Give feedback.
-
| Putting it inside a Modal doesn't work for me :/ |
Beta Was this translation helpful? Give feedback.
-
| This is a common issue with @gorhom/bottom-sheet. The BottomSheetModal renders in a portal, but native Modal creates its own native view hierarchy that sits above everything. Use BottomSheetModalProvider inside the Modal Wrap content inside your Modal with its own provider: import { Modal } from 'react-native'; import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'; <Modal visible={isVisible}> <BottomSheetModalProvider> {/* Your modal content */} <BottomSheetModal ref={bottomSheetRef}> {/* Bottom sheet content */} </BottomSheetModal> </BottomSheetModalProvider> </Modal> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to use the BottomSheetModal inside the native Modal from React Native. Currently when I do this, the BottomSheetModal shows behind the Native modal and isn’t intractable. How do I bring this to front.
Beta Was this translation helpful? Give feedback.
All reactions