All components

MotionSheet

A bottom sheet, top sheet or side drawer with detents, flicks and scroll handoff.

WebReact NativeOverlays

Try it

Preparing the example…

Shortest usage

Filters.jsx
<MotionSheet open={open} onOpenChange={setOpen} detents={[0.45, 0.92]}>
  <FilterList />
</MotionSheet>;

What it handles for you

  • Follows drags, resists past its largest detent and settles with your release speed; a flick moves one detent or closes it.
  • Touch drags hand over to scrollable content: pulling down scrolls the content back to its top before the sheet moves.
  • Detents as fractions of the screen, pixels, or 'content' for the content's natural size.
  • A modal sheet keeps focus inside, makes the page inert and closes with Escape or the backdrop.

Use it for

  • A filter panel.
  • A share menu.
  • A navigation drawer with side="start".

Props

PropTypeDefaultDescription
openbooleanfalseWhether the sheet is shown.
onOpenChange(open) => voidRuns with false when the sheet is dragged, tapped or escaped closed.
detents(number | 'content')[]['content']Resting sizes: a fraction of the screen, pixels, or 'content'.
detentnumberControlled detent index.
defaultDetentnumber0Detent index used when opening without detent.
onDetentChange(index) => voidRuns with the index of the detent the sheet settles on.
side'bottom' | 'top' | 'start' | 'end''bottom'The edge the sheet comes from.
modalbooleantrueAdds a backdrop, keeps focus inside and makes the page inert.
dismissiblebooleantrueDragging past the smallest detent, the backdrop and Escape close it.
backdropClassNamestringClass for the backdrop; backdropStyle sets its inline style.
transitionTransitionspringA timing curve { duration, easing } or a spring { tempo: 'spring', spring }. Springs keep their momentum when interrupted.

Other props go to the rendered element, so className, style and event handlers work as usual.

Web and React Native

On the web a modal sheet is a native dialog; the panel is a flex column that you style with className.

On React Native it renders in a transparent Modal and the back button closes it. Inner ScrollViews keep their own gestures, so the sheet is dragged from its handle, header and other static areas.

Used in these examples

Search

Type to search the documentation.