---
title: "Sheet"
description: "A panel that slides up from the bottom, stops at sensible heights, and can be dragged or dismissed. The one-handed way to act without leaving the page."
url: "https://opsinjs.pensievelabs.org/docs/components/sheet"
source: "https://opsinjs.pensievelabs.org/docs/components/sheet.md"
section: "Components"
status: "shipped"
kind: "component"
category: "surfaces"
reviewed: "2026-09-20"
reviewer: "engineering"
aliases: ["drawer", "bottom sheet", "modal sheet", "detent", "side panel", "slide over"]
governedBy: ["alerts", "consent-and-privacy"]
usedIn: ["alert-escalation", "consent-and-permissions", "daily-logging"]
implemented: true
---

> Elements written as `<PascalCase … />` below are opsinjs documentation
> components. Their attributes are the content: the values they render are
> generated from `tokens/*.json` and `registry/catalogue.ts` and are
> published separately at https://opsinjs.pensievelabs.org/r/index.json and under the Reference
> section.
> `<StubNotice>` IS THE EXCEPTION, AND IT IS THE ONE TO READ. It is a
> paired element rather than a self-closing one, and the text between
> its opening and closing tags is prose an author wrote, reproduced
> below word for word. That prose is where this page says whether the
> component has been reviewed. Read the children, not only the
> attributes.

<StubNotice
  name="sheet"
  status="shipped"
  questions="[
  &#x22;No prop translates the two English strings Sheet ships. Where does a component's own copy live outside English?&#x22;,
  &#x22;The software-keyboard handling has never run on a real device, so the uncovered primary action is only argued.&#x22;,
  &#x22;Nothing here was measured in a browser. What gets measured first: hit areas, a real keyboard, or iOS scrolling?&#x22;,
]"
>
  Audited against WCAG 2.2 AA. Clinical review pending.
</StubNotice>

## Usage [#usage]

<ComponentInstall name="sheet" unbuilt="false" importPath="@/components/ui/sheet" dependencies="[&#x22;@base-ui/react&#x22;, &#x22;lucide-react&#x22;]" registryDependencies="[&#x22;surface&#x22;, &#x22;button&#x22;]" />

```tsx
import { Sheet } from "@/components/ui/sheet"
```

```tsx
<Sheet open={open} onOpenChange={setOpen} title="Add a reading">
  <Sheet.Content>
    <Sheet.Description>What this sheet is for.</Sheet.Description>
    {/* … */}
  </Sheet.Content>
</Sheet>
```

## Examples [#examples]

<ComponentPreview name="sheet" />

### A form the reader cannot leave by accident [#a-form-the-reader-cannot-leave-by-accident]

`dismissible={false}` cancels the scrim, Escape and a downward drag, and
returns focus to the container.

<ComponentPreview name="sheet-a-form-that-stays-put" kind="example" align="start" />

### Two detents, and the button the gesture owes [#two-detents-and-the-button-the-gesture-owes]

A second `detents` entry makes the grabber a real button, moving the sheet
between half and full with no pointer.

<ComponentPreview name="sheet-two-detents-and-a-control" kind="example" align="start" />

## When to use it [#when-to-use-it]

<WhenToUse
  use="[
  &#x22;A focused task started from the current screen, such as capturing a reading.&#x22;,
  &#x22;Content reachable one-handed, where the thumb is.&#x22;,
  &#x22;A surface whose height follows its content, not the viewport.&#x22;,
]"
  avoid="[
  { case: &#x22;A repeated daily log entry, with its own contract and ceiling.&#x22;, instead: &#x22;log-sheet&#x22; },
  { case: &#x22;Asking permission to collect or share data.&#x22;, instead: &#x22;consent-sheet&#x22; },
  { case: &#x22;A decision the reader must make before continuing, at any width.&#x22;, instead: &#x22;dialog&#x22; },
  { case: &#x22;A panel that stays put while the reader works behind it.&#x22;, instead: &#x22;surface&#x22; },
  { case: &#x22;A small menu anchored to a control.&#x22;, instead: &#x22;popover&#x22; },
]"
/>

## Accessibility [#accessibility]

The rendered pass found no axe, target-size, focus-ring or reflow failure at 320px, and
nothing was changed. A modal sheet takes the dialog role, named by `Sheet.Title`, and
traps focus, with the page behind `aria-hidden`, not `inert`. Every gesture has a
control: close for drag-to-dismiss, grabber for drag-between-detents. The footer sits
outside the scrolling region and inside the keyboard inset, keeping the primary action
visible. Under `prefers-reduced-motion` the sheet crossfades in place, and the drag
still works. Close sinks when pressed, so a tap on the one guaranteed exit shows it
landed.

**Residual items.** Focus rings use a negative outline offset to stay visible inside the
clipped popup, meeting 2.4.7 and 1.4.11. No live region announces the new height. The
grabber's accessible name updates to name the next action instead. `modal={false}` pins
the sheet to the bottom while the page behind stays focusable, an unchecked obscured-focus
shape. Default and demo stay modal.

<KeyboardTable
  name="sheet"
  rows="[
  {
    keys: &#x22;Tab&#x22;,
    action: &#x22;Moves through the sheet's own controls&#x22;,
    notes: &#x22;Trapped in a modal sheet.&#x22;,
  },
  {
    keys: &#x22;Shift + Tab&#x22;,
    action: &#x22;Moves backwards through the same controls&#x22;,
    notes: &#x22;Reverse order; footer stays last.&#x22;,
  },
  {
    keys: &#x22;Enter&#x22;,
    action: &#x22;Activates the focused control&#x22;,
    notes: &#x22;Moves the grabber to the next detent.&#x22;,
  },
  {
    keys: &#x22;Space&#x22;,
    action: &#x22;Activates the focused button, or scrolls the content&#x22;,
    notes: &#x22;Scrolls Sheet.Content, not the page.&#x22;,
  },
  {
    keys: &#x22;Escape&#x22;,
    action: &#x22;Closes a dismissible sheet and returns focus to what opened it&#x22;,
    notes: &#x22;With dismissible={false}, returns to the container.&#x22;,
  },
  {
    keys: &#x22;Arrow keys&#x22;,
    action: &#x22;Scroll the content, once focus is in the scrolling region&#x22;,
    notes: &#x22;Only the grabber changes detent.&#x22;,
  },
]"
/>

<ContrastReport component="sheet" />

## Props interface [#props-interface]

### Sheet [#sheet]

<PropsTable name="SheetProps" />

`detents` defaults to `["content"]`; its first entry is where the sheet opens.
`half` and `full` combine, `content` stands alone. `onOpenChange` receives the
close route second, so a product can ask before discarding unsaved work.

### Sheet.Content [#sheetcontent]

<PropsTable name="SheetContentProps" />

### Sheet.Description [#sheetdescription]

<PropsTable name="SheetDescriptionProps" />

### Data attributes [#data-attributes]

<DataAttributesTable
  name="sheet"
  rows="[
  {
    attribute: &#x22;data-slot&#x22;,
    condition: &#x22;On every rendered part&#x22;,
    value: &#x22;sheet-container, sheet-grabber, sheet-header, sheet-title, sheet-close, sheet-scrim, sheet-content, sheet-description, sheet-footer&#x22;,
  },
  {
    attribute: &#x22;data-open, data-closed, data-starting-style, data-ending-style&#x22;,
    condition: &#x22;On the viewport, the scrim and the container&#x22;,
    value: &#x22;present&#x22;,
  },
  {
    attribute: &#x22;data-expanded&#x22;,
    condition: &#x22;While the active detent is full&#x22;,
    value: &#x22;present&#x22;,
  },
  {
    attribute: &#x22;data-swiping, data-swipe-dismiss, data-swipe-direction&#x22;,
    condition: &#x22;During a drag; dismiss means release would close it&#x22;,
    value: &#x22;present, direction down&#x22;,
  },
  {
    attribute: &#x22;data-drawer-content&#x22;,
    condition: &#x22;Always; makes a touch there scroll, not swipe&#x22;,
    value: &#x22;present&#x22;,
  },
]"
/>
