Skip to main content

BottomSheet | Modal

Import

import BottomSheet from '@/components/shared/bottomsheet/BottomSheet';

Props

PropTypeDefaultDescription
childrenReact.ReactNodeRequiredThe content to render inside the bottom sheet.
heightnumber350Height of the bottom sheet (ignored if fullHeight is true).
titlestring'Choose Option'Optional title shown at the top of the bottom sheet.
bottomSheetRefRef<RBSheetRef>RequiredRef object used to control the bottom sheet externally.
closeOnPressMaskbooleantrueIf true, tapping outside the sheet will close it.
closeAction() => void-Callback fired when the close icon is pressed.
fullHeightbooleanfalseIf true, expands the bottom sheet to (screen height - 60).
containerStyleStyleProps-Optional custom style for the bottom sheet container.
childContainerStyleStyleProps-Optional style applied to the children container inside the sheet.

Usage Examples

Usage Examples

Basic Usage

<BottomSheet
bottomSheetRef={bottomSheetRef}
>
<Text>Sheet content here</Text>
</BottomSheet>

With Title and Close Action

<BottomSheet
title="Select Item"
bottomSheetRef={bottomSheetRef}
closeAction={() => console.log('Closed')}
>
<Text>List of options</Text>
</BottomSheet>

Full Height Sheet

<BottomSheet
fullHeight
bottomSheetRef={bottomSheetRef}
>
<Text>Full screen modal content</Text>
</BottomSheet>

NOTE: All example can be founded in modal_bottomSheet.tsx