Skip to content
PixiKit

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
NameTypeDefaultDescription
triggerReactNodeNoneWhat the trigger button shows. Leave it out to open the sheet with `open` instead.
openbooleanNoneWhether the sheet is open, when you hold the state.
defaultOpenbooleanNoneWhether the sheet is open at first, when the sheet holds the state.
onOpenChange(open: boolean) => voidNoneCalled with the next open state.
side"right" | "left" | "top" | "bottom""right"The edge the panel slides in from.
sizenumber | "sm" | "md" | "lg" | "full""md"Width (left and right) or height (top and bottom): px, a preset, or `full`.
titlestringNoneThe heading; it names the sheet for screen readers.
descriptionstringNoneA line under the title; it describes the sheet for screen readers.
childrenReactNodeNoneThe body content; it scrolls when it is long.
footerReactNodeNoneSticks to the bottom of the panel; a shadow shows above it while the body has more to scroll.
backdropbooleantrueDims 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.
draggablebooleantrueLets 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() => booleanNoneCalled before a user close (Escape, backdrop, close button, drag). Return false to keep the sheet open, for example with unsaved changes.
portalbooleantrueRenders in a portal on the page body and locks page scroll; turn off to fill the nearest positioned parent instead.
classNamestringNoneExtra classes for the sheet panel.

More interaction components in Pro

View all

Related