Sheet / Drawer
Sliding panel for side, top, or bottom contextual workflows.
Installation
Install from the package for shared ownership or from the registry for copy-paste control.
Package Manager
pnpm add @glinui/ui @glinui/tokensRegistry
pnpm dlx @glinui/cli@latest add sheetUsage
Basic
1import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetClose, Button } from "@glinui/ui"23export function Demo() {4 return (5 <Sheet>6 <SheetTrigger asChild><Button variant="outline">Open Sheet</Button></SheetTrigger>7 <SheetContent>8 <SheetHeader>9 <SheetTitle>Settings</SheetTitle>10 <SheetDescription>Adjust preferences.</SheetDescription>11 </SheetHeader>12 <SheetFooter>13 <SheetClose asChild><Button variant="ghost">Cancel</Button></SheetClose>14 <Button>Save</Button>15 </SheetFooter>16 </SheetContent>17 </Sheet>18 )19}
Bottom Sheet
1import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, Button } from "@glinui/ui"23export function Demo() {4 return (5 <Sheet>6 <SheetTrigger asChild><Button>Bottom Sheet</Button></SheetTrigger>7 <SheetContent side="bottom">8 <SheetHeader><SheetTitle>Quick Actions</SheetTitle></SheetHeader>9 </SheetContent>10 </Sheet>11 )12}
Accessibility
- Built on Radix Dialog with focus trapping.
- SheetTitle required for screen readers.
Keyboard Interactions
| Key | Action |
|---|---|
| Escape | Close the sheet. |
| Tab | Cycle focus within the sheet. |
ARIA Attributes
- `role="dialog"`
- `aria-modal="true"`
- `aria-labelledby`
Reduced Motion
Slide transitions respect `prefers-reduced-motion`.
Affected properties
transformAPI Reference
Sheet
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
open | boolean | - | - | Controlled open state. |
defaultOpen | boolean | - | - | Initial open state. |
onOpenChange | (open: boolean) => void | - | - | Open state change handler. |
modal | boolean | - | true | Trap focus and block background interaction. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetTrigger
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
asChild | boolean | - | false | Render as child element. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetContent
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | default | Visual treatment. |
size | "sm" | "md" | "lg" | No | md | Panel width/height. |
side | "top" | "bottom" | "left" | "right" | No | right | Slide-in direction. |
SheetHeader
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetTitle
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetDescription
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetFooter
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetClose
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
asChild | boolean | - | false | Render as child element. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { Sheet,Drawer } from "@glinui/ui"Source Files
Dependencies
@glinui/uiGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/sheet.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata
Primary Props Type
SheetProps
SheetContentProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetContentVariants. |
SheetDescriptionProps
No explicit fields extracted for this props type.
SheetFooterProps
No explicit fields extracted for this props type.
SheetHeaderProps
No explicit fields extracted for this props type.
SheetOverlayProps
No explicit fields extracted for this props type.
SheetPortalProps
No explicit fields extracted for this props type.
SheetProps
No explicit fields extracted for this props type.
SheetTitleProps
No explicit fields extracted for this props type.
SheetTriggerProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetTriggerVariants. |
variant | "default" | "glass" | "frosted" | "outline" | "ghost" | No | "default" | Variant option from sheetTriggerVariants. |