children |
yes |
|
Use Sheet.Container/Content/Header/Backdrop to compose your bottom sheet. |
isOpen |
yes |
|
Boolean that indicates whether the sheet is open or not. |
onClose |
yes |
|
Callback fn that is called when the sheet is closed by the user. |
avoidKeyboard |
no |
true |
Automatically avoid the virtual keyboard by adding bottom padding when the keyboard is open. Only works on mobile devices with Virtual Keyboard or Visual Viewport API support. |
disableDrag |
no |
false |
Disable drag for the whole sheet. |
disableDismiss |
no |
false |
Disable dismissing the sheet via dragging or high velocity swipe. When enabled, the sheet can only be closed programmatically. |
disableScrollLocking |
no |
false |
Disable scroll locking for the body element while sheet is open. Can be useful if you face issues with input elements and the iOS virtual keyboard. See related issue. |
detent |
no |
'default' |
The detent in which the sheet should be in when opened. Available values: 'default', 'content', or 'full'. |
onOpenStart |
no |
|
Callback fn that is called when the sheet opening animation starts. |
onOpenEnd |
no |
|
Callback fn that is called when the sheet opening animation is completed. |
onCloseStart |
no |
|
Callback fn that is called when the sheet closing animation starts. |
onCloseEnd |
no |
|
Callback fn that is called when the sheet closing animation is completed. |
onSnap |
no |
|
Callback fn that is called with the current snap point index when the sheet snaps to a new snap point. Requires snapPoints prop. |
snapPoints |
no |
|
Eg. [0, 0.5, 100, 1] - where positive values are pixels from the bottom of the sheet and negative from the top. Values between 0-1 represent percentages, eg. 0.5 means 50% of sheet height. Must be in ascending order and should include 0 (closed) and 1 (fully open). |
initialSnap |
no |
0 |
Initial snap point when sheet is opened (index from snapPoints). |
modalEffectRootId |
no |
|
The id of the element where the main app is mounted, eg. “root”. Enables iOS modal effect. Can also be the id of another sheet to stack sheets. |
modalEffectThreshold |
no |
0 |
Threshold value between 0-1 which determines when the iOS modal effect will start while dragging the sheet - 0 corresponding to the start of the drag (0% has been dragged into view) and 1 corresponding to the end of the drag (100% of the sheet is visible). |
tweenConfig |
no |
{ ease: 'easeOut', duration: 0.2 } |
Overrides the config for the sheet tween transition when the sheet is opened, closed, or snapped to a point. |
mountPoint |
no |
document.body |
HTML element that should be used as the mount point for the sheet. |
prefersReducedMotion |
no |
false |
Skip sheet animations (sheet instantly snaps to desired location). |
dragVelocityThreshold |
no |
500 |
How fast the sheet must be flicked down to close. Higher values make the sheet harder to close. |
dragCloseThreshold |
no |
0.6 |
The portion of the sheet which must be dragged off-screen before it will close. |
unstyled |
no |
false |
Remove all decorative styles and only apply base functional styles. Useful when you want to completely customize the sheet appearance. |