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| 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. |
header | "plain" | "filled" | "plain" | `filled` tints the header band. |
children | ReactNode | ((state: SideSheetState) => ReactNode) | None | The 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> | None | Called 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. |
submitLabel | string | "Save" | The submit button's label. |
cancelLabel | string | "Cancel" | The cancel button's label. |
guard | boolean | true | Refuses a close once while the form has changed, and asks to keep editing or discard. |
tabs | SideSheetTab[] | None | Tabs under the header; a marker slides between them. |
tab | string | None | The id of the open tab, when you hold the state. |
onTabChange | (tab: string) => void | None | Called with the id of the tab chosen. |
steps | number | None | The number of steps (2 or more). The footer becomes Back and Next with a progress line, and the body slides between steps. |
step | number | None | The zero-based step, when you hold the state. |
onStepChange | (step: number) => void | None | Called with the step chosen. |
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. |