Sheet
Open content in an edge panel.
Installation
pnpm dlx shadcn@4.18.0 add @siteplane/sheetComplete the one-time setup first. Registry JSON lists source files and dependencies.
For this page’s examples, also install:
pnpm dlx shadcn@4.18.0 add @siteplane/button @siteplane/form @siteplane/inputUsage
import { Button } from "@/siteplane/components/button";
import {
Sheet,
SheetTrigger,
SheetPopup,
SheetHeader,
SheetTitle,
SheetDescription,
SheetPanel,
SheetFooter,
SheetClose,
} from "@/siteplane/components/sheet";
<Sheet>
<SheetTrigger render={<Button variant="outline" />}>Open</SheetTrigger>
<SheetPopup>
<SheetHeader>
<SheetTitle>Project details</SheetTitle>
<SheetDescription>Owner, status and due date.</SheetDescription>
</SheetHeader>
<SheetPanel>Content</SheetPanel>
<SheetFooter>
<SheetClose render={<Button variant="ghost" />}>Close</SheetClose>
</SheetFooter>
</SheetPopup>
</Sheet>;Composition
Sheet
├── SheetTrigger
└── SheetPopup
├── SheetHeader
│ ├── SheetTitle
│ └── SheetDescription
├── SheetPanel
└── SheetFooter
└── SheetCloseSide
Set side on SheetPopup to open the panel from the right (default), left, top or bottom edge. Sheet uses dialog behavior and has no swipe gestures; use Drawer for swipe dismissal. In a right-to-left page, left and right are the inline start and end: a left sheet opens on the right and slides in from that edge.
Scrollable content
SheetPanel scrolls long content between the header and footer, which stay in place.
Inset
Set variant="inset" to float the sheet away from the viewport edges with rounded corners on larger screens.
Fullscreen navigation
Set variant="fullscreen" on SheetPopup to fill the viewport, for navigation on a small screen. With side="top" the sheet fades in and moves a short distance; with left or right it slides in from that edge, which suits a nested page that opens from a row. Reduced motion removes the movement. Compose SheetClose for a Back action; a nested sheet returns focus to its own trigger when it closes. Sidebar uses this variant for its mobileVariant="fullscreen".
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
Sheet | right | left | top | bottom | right | Panel edge. |
Sheet | default | inset | fullscreen | default | default runs from edge to edge, inset floats away from the viewport edges with rounded corners on larger screens, and fullscreen fills the viewport. |
Sheet | boolean | true | Automatic close icon. |
Sheet | SheetPrimitive.Close.Props | unset | Props for the automatic close control. |
Sheet | SheetPrimitive.Portal.Props | unset | Portal configuration. |
Sheet | right | left | top | bottom | unset | Low-level viewport side; Popup supplies it. |
Sheet | default | inset | fullscreen | default | Low-level viewport layout; Popup supplies it. |
Sheet | boolean | true | Scroll-area edge fade. |
Sheet and SheetPortal are direct Dialog foundation exports. Trigger/Close, Backdrop/Viewport and Title/Description wrap those parts. SheetOverlay aliases Backdrop; SheetContent aliases Popup; SheetPrimitive exports the Dialog namespace. Header/Footer/Panel accept useRender div props (including render, string className and refs). Popup automatically includes Portal, Backdrop, Viewport and portal scope. Other open, modal, focus, dismissal and events follow Base UI Dialog.
open/defaultOpen choose controlled/initial state (closed by default); onOpenChange(open, eventDetails) requests a transition and onOpenChangeComplete(open) reports motion completion. Initial/final focus and dismissal behavior belong to the underlying foundation.
SheetBackdrop accepts SheetPrimitive.Backdrop props and string className and renders the kit’s fixed full-screen scrim. SheetPopup already renders its backdrop; do not add a duplicate.
Usage notes
Provide a title, clear close action and meaningful focus target. Escape and focus restoration follow the foundation. Application loading, errors and async confirmation must be represented explicitly in the content.