Skip to content

Imperative control

const actionsRef = useRef<SheetActions>(null);
<Sheet.Root actionsRef={actionsRef} detents={['content', 'full']}>
{/* ... */}
</Sheet.Root>
<button onClick={() => actionsRef.current?.snapTo('full')}>Expand</button>

Use actionsRef.current.open(), .close(), or .snapTo(detent) when controlling props is awkward, such as in a deep-link handler or push notification. These methods animate like controlled prop changes. If the requested detent is not configured, snapTo uses the nearest one and warns once in development.

Tap 25%, 55%, or Full. Each button calls actionsRef.snapTo, no drag needed.