Sheet
Sheet slides a panel in from an edge of the window and dims the app behind it until the task is done.
<Sheet side="inline-end"> <SheetTrigger render={<Button>Filters</Button>} /> <SheetContent> <SheetTitle>Filters</SheetTitle> <SheetDescription> Narrow the deploys shown on this page. </SheetDescription> <SheetClose render={<Button>Apply</Button>} /> </SheetContent></Sheet>Use a Sheet for a task that needs more room than a Popover but belongs beside the page rather than in the middle of it, such as filters, a share panel or navigation on a phone. The panel sits against an edge of the window and dims the app behind it.
For a task that belongs in the centre of the screen, use a Dialog, and for a short question that needs an answer, use an AlertDialog. For a panel that stays open while people keep working on the page, use a Shell pane such as ShellInspector.
A Sheet behaves like a Dialog. Focus stays inside the panel, the page behind it stops scrolling, and the dimmed background shows that the page is not available. Escape, a press on the dimmed background or a swipe toward the edge closes it, and onOpenChange tells you what closed it.
side can be bottom, which is the default, inline-start or inline-end. The inline sides follow the reading direction, so a panel that opens from the right in English opens from the left in Arabic without any change to your markup. While a person drags the panel toward its edge, it follows their finger, and on a phone a bottom sheet stays above the on-screen keyboard.
size sets the panel's width, padding and corner, together with the text size of SheetTitle and SheetDescription. A side sheet uses that width exactly, while a bottom sheet uses it as a maximum, so it fills a phone's width. Content that you add keeps its own sizes.
Screen readers announce the panel as a dialog, named by SheetTitle and described by SheetDescription. The part names follow shadcn/ui's sheet (MIT), and the behaviour comes from Base UI's Drawer.
Topics
Every symbol this component exports, grouped by the job it does. Each one carries the props it declares; each one has an anchor of its own.
Opening the sheet
Sheet
Sheet slides a panel in from an edge of the window and dims the app behind it until the task is done.
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | A <SheetTrigger> and a <SheetContent>, in either order. |
defaultOpen? | boolean | Whether the sheet is open at the start, for an uncontrolled sheet. |
onOpenChange? | (open: boolean, details: SheetOpenChangeDetails) => void | Called each time the sheet opens or closes. |
open? | boolean | Whether the sheet is open, for a controlled sheet. |
side? | "bottom" | "inline-start" | "inline-end" | The edge that the sheet comes in from. |
size? | "1" | "2" | "3" | "4" | The size step of the sheet, from "1" to "4". |
SheetTrigger
The button that opens the sheet, usually with render={<Button />}. You don't need one if your own state opens the sheet
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | The label of the button. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
nativeButton? | boolean | Whether the rendered element is a native <button>. |
render? | RenderElement | The element to render as the button, usually a Kookie Button: <SheetTrigger render={<Button/>}>Filters</SheetTrigger>. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <button>.
Presenting the panel
SheetContent
The panel. It dims the page, places the panel against the chosen edge and applies your theme, and its body scrolls when the content is tall
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | The content of the panel. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <div>.
Naming the panel
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | The title of the sheet. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <h2>.
SheetDescription
A supporting line that screen readers read after the title, so avoid repeating the title's words in it
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | A short description of the sheet. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <p>.
Closing the sheet
SheetClose
Closes the sheet when pressed. Pass your own Button through render and place it wherever your layout needs it
| Prop | Type | What it does |
|---|---|---|
children? | React.ReactNode | The label of the button. |
className? | string | Your classes, appended to the ones this component resolves rather than replacing them. |
nativeButton? | boolean | Whether the rendered element is a native <button>. |
render? | RenderElement | The element to render as the button, usually a Kookie Button: <SheetTrigger render={<Button/>}>Filters</SheetTrigger>. |
style? | React.CSSProperties | Inline styles, merged last, so your value wins over anything the component resolved. |
It also takes every prop of a <button>.
- A top side, and a physical left or right — The top edge is where system and app toolbars sit, so a sheet does not open there. The sides follow the reading direction instead of left and right, so a layout works in both directions without changes.
- Header and footer parts, and a close button in the corner — Arrange the title and the actions yourself in a Stack. To add a close or apply button, place a real Button inside
SheetClosewherever your layout needs it. modalanddisablePointerDismissal— An open sheet always keeps focus inside the panel and stops the page from scrolling. For a panel that leaves the page usable, use a Shell pane.- Snap points, and a swipe that opens the sheet — A sheet is either open or closed. Half-open positions and edge swipes that open it would conflict with the browser's own back gesture.
- A sheet inside a sheet — Two panels that each hold the focus cannot agree on which one has it. Change what the open sheet shows instead of opening a second one.
toneandemphasis— The panel is a container and has no meaning of its own. Put tone and emphasis on the components inside it.- An extra shadow — The dimmed page already shows that the sheet covers the app, so the panel adds no shadow of its own.