React Native · Components
Sheet
A panel that slides in from a screen edge: side menu, filters, cart, bottom sheet, result list over a map.
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Code
Events
- Events appear here when you interact with the preview.
Bottom sheet: opens halfway, grows when pulled up by the handle (mouse or finger)
A panel that stays open: modal={false}, dismissible={false}
Import
Sheet
componentA panel that slides in from a screen edge: side menu, filters, cart, bottom sheet, result list over a map. Same API as the web Sheet; in addition to all of Dialog's props there are snap points (snapPoints) and non-modal use.
- Dragging: The panel can be dragged by any part with a finger; pushing it towards its edge or a quick fling closes it. With snap points a fling jumps to the next point.
- Content scrolling: When the body is at the top, pulling down shrinks the panel; content does not scroll until the panel reaches its largest point (the panel grows first). For your own list use
useSheetScroll. - Edge: The edge it opens from always stays attached to the screen. Pulling beyond the largest point does not detach the panel from the edge; it stretches attached to that edge. When a bottom panel sits on the keyboard, no gap shows behind the keyboard's rounded corners.
- The Android back button and (when modal) tapping the backdrop close it. Respects safe area insets and the on-screen keyboard. Looks the same on iOS and Android; animations run on the native driver.
Examples
useSheetScroll
functionIf you put your own ScrollView/FlatList inside a Sheet or Dialog, pass these props: pulling down while the list is at the top shrinks the panel, and the list does not scroll until the panel reaches its largest point. Returns null outside a window.
Examples
SheetProps
interfaceProps of the Sheet component (same as web).
Extends: ModalOwnProps
| Name | Type | Default | Description |
|---|---|---|---|
side? | SheetSide | "right" | Edge the panel opens from. |
snapPoints? | readonly SheetSnapPoint[] | Sizes the panel can rest at while dragging, smallest to largest (e.g. [0.4, 0.92]: first 40% of the screen, almost all of it when pulled up). If omitted the panel opens to its content size (3/4 of the screen on the sides, at most 384 pixels) and is dragged only to close. | |
snap? | number | Index of the active snap point in controlled use. | |
defaultSnap? | number | 0 | Index of the point to rest at when opened, in uncontrolled use. |
onSnapChange? | (index: number) => void | Called with the new index when the active snap point changes. | |
modal? | boolean | true | When false the backdrop is not dimmed and stays interactive (like a list over a map). |
dismissible? | boolean | true | When false pulling below the smallest point does not close it; the panel always stays open (a persistent bottom panel with modal={false}). |
handle? | boolean | true | Show the drag handle? Tapping the handle cycles between points; for screen readers it is an adjustable element (swipe up/down). Not shown when swipeToClose={false}. |
SheetSnapPoint
typeSnap point: a number between 0 and 1 is that fraction of the screen (0.5 = half), text like "320px" is a fixed size.
SheetSide
typeEdge the panel opens from. In right-to-left languages too, left/right are physical edges.