Sheet
A panel that slides up from the bottom edge, with a handle, medium and large detents, and drag down or a backdrop press to dismiss.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
title | string | A heading under the handle, and the sheet's accessible name ("Sheet" without one). | |
open | boolean | bindable(false) | Whether the sheet shows. Bind it with bind:open={name}; the trigger piece sets it, and Escape, the backdrop or a drag down clears it. |
detent | "medium" | "large" | bindable("medium") | How tall the sheet opens: about half the window, or nearly all of it. Dragging the handle moves between them while it is open; bind it with bind:detent={name} to follow the drag. |
Pieces
| Piece | Means |
|---|---|
trigger | The control that opens the sheet. Focus returns to it on close. |
Children
The sheet's content, which scrolls when taller than the sheet.
States
| State | Looks like |
|---|---|
medium | 52% of the window's height, with rounded top corners and a shadow, over the scrim. |
large | The window's height less 48px. |
dragging | The panel follows the pointer down, and resists going up; released, it settles at a detent or leaves. |
wide window | From 768px wide, a 420px panel slides in from the trailing side at full height, with no handle and no drag. |
opening | Slides up (or in) in 280 ms while the scrim fades in; at once with reduced motion. |
Accessibility
| role | dialog with aria-modal="true" |
| name | The title prop (aria-label). |
| focus | On open, focus moves to the first focusable element in the content. Tab and Shift+Tab stay inside; the page behind is inert and does not scroll. On close, focus returns to the control that opened it. |
| keyboard | Escape closes it. |
| notes | Dragging is a pointer gesture only; Escape and the backdrop dismiss it without one, and the detent can be set with the detent prop. |
Theme tokens
color.scrim color.surface color.ink color.border shadow.lg radius.xl radius.full space.2 space.3 space.4 space.6 text.heading
Example
<Sheet title="Share" bind:open={sharing}><Button label="Copy link" full onPress={copy} /></Sheet>