Sheet
A panel that slides in from an edge with a scrolling body and a sticky footer. A drag toward the edge moves it and closes it past a third of its size or on a flick.
pixikit.com/docs/components/sheet
Customize
Default open
Side
Backdrop
Close placement
Draggable
Portal
Props
16| Name | Type | Default | Description |
|---|---|---|---|
trigger | ReactNode | None | What the trigger button shows. Leave it out to open the sheet with `open` instead. |
open | boolean | None | Whether the sheet is open, when you hold the state. |
defaultOpen | boolean | None | Whether the sheet is open at first, when the sheet holds the state. |
onOpenChange | (open: boolean) => void | None | Called with the next open state. |
side | "right" | "left" | "top" | "bottom" | "right" | The edge the panel slides in from. |
size | number | "sm" | "md" | "lg" | "full" | "md" | Width (left and right) or height (top and bottom): px, a preset, or `full`. |
title | string | None | The heading; it names the sheet for screen readers. |
description | string | None | A line under the title; it describes the sheet for screen readers. |
children | ReactNode | None | The body content; it scrolls when it is long. |
footer | ReactNode | None | Sticks to the bottom of the panel; a shadow shows above it while the body has more to scroll. |
backdrop | boolean | true | Dims the page and closes on a click outside. Without it the page stays usable and focus is not trapped. |
closePlacement | "inside" | "outside" | "none" | "inside" | Where the close button sits: in the header, outside the panel's edge, or not at all. |
draggable | boolean | true | Lets a drag toward the edge move the panel; it closes past a third of its size or on a flick. A bottom sheet shows a grab handle. |
onCloseRequest | () => boolean | None | Called before a user close (Escape, backdrop, close button, drag). Return false to keep the sheet open, for example with unsaved changes. |
portal | boolean | true | Renders in a portal on the page body and locks page scroll; turn off to fill the nearest positioned parent instead. |
className | string | None | Extra classes for the sheet panel. |