← Inventory
Sheet
Root component for a sheet (side panel). Manages open/closed state and accessibility. Import from "@desk/ui/components/sheet".
Usage
@desk/ui/components/sheet
<Sheet>
<SheetTrigger asChild>
<Button emphasis="outline" icon={SlidersHorizontal} tone="neutral">
Filter materials
</Button>
</SheetTrigger>
<SheetContent>
<SheetHeader>
<SheetTitle>Filter materials</SheetTitle>
<SheetDescription>
Narrow the catalogue by finish, origin, and lead time.
</SheetDescription>
</SheetHeader>
<Text className="mt-4" size="sm" variant="muted">
Showing 128 materials across 14 collections.
</Text>
<SheetFooter>
<Button>Apply filters</Button>
<Button emphasis="ghost" tone="neutral">
Reset
</Button>
</SheetFooter>
</SheetContent>
</Sheet>Best practices
Use
Sheetfor a simple edge panel holding a focused form / settings; a drag-to-dismiss bottom sheet is aDrawer, and nested panels are aSidepanel.Set the entry edge via
SheetContentside; always render aSheetTitle(wrap insr-onlyif hidden) so the panel is announced.
Props
SheetContent
| Prop | Type | Default | Description |
|---|---|---|---|
| side | SheetSide | Side from which sheet slides in. |
SheetDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
SheetTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string |
Also exports
- component
Sheet - const
sheetAnatomy - component
SheetClose - component
SheetFooter - component
SheetHeader - component
SheetOverlay - component
SheetPortal - component
SheetTrigger
Anatomy
Sheet
sheetSlide-out panel from screen edge
SheetTrigger
sheet-triggerElement that opens sheet
SheetContent
sheet-contentSheet panel container
SheetHeader
sheet-headerTop section with title/description
SheetTitle
sheet-titleSheet heading
SheetDescription
sheet-descriptionSheet description text
SheetFooter
sheet-footerBottom section for actions
SheetClose
sheet-closeClose button
Composition
Used by