Duolith docs

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

PropTypeDefaultMeans
titlestringA heading under the handle, and the sheet's accessible name ("Sheet" without one).
openbooleanbindable(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

PieceMeans
triggerThe control that opens the sheet. Focus returns to it on close.

Children

The sheet's content, which scrolls when taller than the sheet.

States

StateLooks like
medium52% of the window's height, with rounded top corners and a shadow, over the scrim.
largeThe window's height less 48px.
draggingThe panel follows the pointer down, and resists going up; released, it settles at a detent or leaves.
wide windowFrom 768px wide, a 420px panel slides in from the trailing side at full height, with no handle and no drag.
openingSlides up (or in) in 280 ms while the scrim fades in; at once with reduced motion.

Accessibility

roledialog with aria-modal="true"
nameThe title prop (aria-label).
focusOn 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.
keyboardEscape closes it.
notesDragging 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>