Page transitions
<div data-scrollsheet-background>{/* your page content */}</div>
<Sheet.Root backgroundEffect="scale" detents={['full']}>Scale and parallax
Section titled “Scale and parallax”Add data-scrollsheet-background to your page wrapper. backgroundEffect="scale" scales,
insets, and rounds it as the sheet moves. With a 'full' detent, this creates a stacked-page
effect. 'parallax' shifts the wrapper without scaling it.
For nested sheets, read --scrollsheet-stack-progress on the parent panel to drive a similar
effect.
The automatic default
Section titled “The automatic default”A full-height mobile bottom sheet defaults to 'scale' when opened from inside the marked
wrapper. Desktop drawers leave the page unchanged. Set 'none' to disable the effect.
Targeting a ref instead
Section titled “Targeting a ref instead”Use backgroundRef to target a wrapper directly. This avoids adding an attribute or matching
the wrong wrapper when a page has several:
const pageRef = useRef<HTMLDivElement>(null);
<div ref={pageRef}>{/* your page content, no attribute needed */}</div>
<Sheet.Root backgroundEffect="scale" backgroundRef={pageRef} detents={['full']}>It skips the marker lookup. Pair it with an explicit backgroundEffect when the opener is
outside that wrapper; the automatic default still checks opener ownership.