Skip to content
PixiKit

Side Sheet

A sheet for creating or editing something. It wraps its fields in a real form, shows the submit as a spinner then a drawn check, asks before discarding changes, and can add tabs with a sliding marker or steps that slide sideways.

pixikit.com/docs/app-ui/overlays/side-sheet

Customize

Default open
Side
Size
Header
Guard
Portal

Props

22
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.
header"plain" | "filled""plain"`filled` tints the header band.
childrenReactNode | ((state: SideSheetState) => ReactNode)NoneThe form fields. A function gets the step and tab and is called for each of them, so every field stays in the form.
onSubmit(data: FormData) => void | Promise<void>NoneCalled with the form's data when it is submitted. While the promise runs the button spins, then a check draws and the sheet closes; a rejection keeps it open and shows its message.
submitLabelstring"Save"The submit button's label.
cancelLabelstring"Cancel"The cancel button's label.
guardbooleantrueRefuses a close once while the form has changed, and asks to keep editing or discard.
tabsSideSheetTab[]NoneTabs under the header; a marker slides between them.
tabstringNoneThe id of the open tab, when you hold the state.
onTabChange(tab: string) => voidNoneCalled with the id of the tab chosen.
stepsnumberNoneThe number of steps (2 or more). The footer becomes Back and Next with a progress line, and the body slides between steps.
stepnumberNoneThe zero-based step, when you hold the state.
onStepChange(step: number) => voidNoneCalled with the step chosen.
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 overlays blocks in Pro

View all

Related