Documentation
API Reference

API Reference

Props

NameTypeDefaultDescription
children?ReactNodeundefinedSheet's content.
className?string''Additional class names that will be applied to the sheet.
detents?Array<string | number>["50%", "97%"] Array of detent values that sheet should stick to. Each detent be either a number of pixels or a percentage of the vertical viewport, both counting from the bottom to the top. Non-number or inapropriately formatted string values will be ignored.
IMPORTANT: Detents should be in order from smallest to largest, otherwise the result might look stange.
Example: [100, 200, 300] [100, "50%"], ["90%"]
expansionSwitchThreshold?number50Amount of pixels that sheet should be dragged before switching expanded state.
grabberVisible?booleanfalseA Boolean value that determines whether the sheet shows a grabber at the top.
largestUndimmedDetentIndex?number-1The largest detent's index that doesn’t dim the view underneath the sheet. Default value is -1 which means that dim is always enabled.
permanent?booleanfalseControls whether sheet persists on page or not.
domNode?Element | DocumentFragmentfalseCustom DOM node to render bottom sheet into.
Passed directly to createPortal.
standalone?booleanfalseRenders component without a portal.
By default, bottom sheet is rendered inside a portal, thus only on client side in SSR/SSG environments (because React's createPortal cannot be called server-side).
If you want to heavily customize rendering behaviour, like allowing it to bypass mentioned limitation, you can pass this prop.

ref.current Object Properties

NameTypeDescription
close() => voidCloses sheet
collapse() => voidCollapses sheet one detent down
expand() => voidExpands sheet one detent up
expandToIndex(i: number) => voidExpands sheet to specific detent by it's index
open() => voidOpens sheet
scrollContainerHTMLDivElement | nullReference to the DOM node which holds sheet's children