Sheet / Drawer
Sliding panel for side, top, or bottom contextual workflows.
pnpm dlx @glinui/cli@latest add sheetRentals near you
- Harbor loft2 bed, 1 bath$2,400
- Maple row house3 bed, 2 bath$3,150
- Station studioStudio, 1 bath$1,350
Installation
pnpm dlx @glinui/cli@latest add sheetPrefer the package?
Usage
Overlay demos on this page render inside the preview stage so they stay contained. In your app they portal to the document body as usual.
Mobile navigation
A left sheet used as a mobile nav drawer.
Tap the menu to slide the navigation in from the left.
"use client"
import { FolderSimple, GearSix, House, List, Users } from "@phosphor-icons/react"import { Button, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, Text} from "@glinui/ui"
export function SheetMobileNavExample() { const links = [ { icon: House, label: "Home" }, { icon: FolderSimple, label: "Projects" }, { icon: Users, label: "Team" }, { icon: GearSix, label: "Settings" } ] return ( <div className="mx-auto w-full max-w-sm rounded-2xl border border-[var(--line-soft)] bg-[var(--surface-1)] [box-shadow:var(--elev-1)]"> <div className="flex items-center gap-2 border-b border-[var(--line-soft)] px-3 py-2"> <Sheet> <SheetTrigger asChild><Button size="icon" variant="ghost" aria-label="Open menu"><List aria-hidden="true" /></Button></SheetTrigger> <SheetContent side="left"> <SheetHeader> <SheetTitle>Lumen</SheetTitle> <SheetDescription>Jump to a section.</SheetDescription> </SheetHeader> <nav aria-label="Mobile" className="grid gap-1 py-4"> {links.map(({ icon: Icon, label }) => ( <a key={label} href="#" className="flex items-center gap-3 rounded-lg px-3 py-2 text-sm hover:bg-[color-mix(in_oklab,var(--color-foreground)_8%,transparent)]"><Icon aria-hidden="true" className="size-4" />{label}</a> ))} </nav> </SheetContent> </Sheet> <span className="text-sm font-semibold">Lumen</span> </div> <div className="p-4"><Text size="sm" className="text-[var(--color-muted)]">Tap the menu to slide the navigation in from the left.</Text></div> </div> )}Bottom Sheet
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, Button } from "@glinui/ui"
export function Demo() { return ( <Sheet> <SheetTrigger asChild><Button>Bottom Sheet</Button></SheetTrigger> <SheetContent side="bottom"> <SheetHeader><SheetTitle>Quick Actions</SheetTitle></SheetHeader> </SheetContent> </Sheet> )}Variants
Every look of the shared vocabulary: glinr (the default), plain (shadcn), solid, soft, outline, ghost, gradient and glass. Omit `variant` to follow the ambient design style.
import { Button, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "@glinui/ui"
const variants = ["glinr", "plain", "solid", "soft", "outline", "ghost", "gradient", "glass"] as const
export function Demo() { return ( <div className="flex flex-wrap gap-2"> {variants.map((variant) => ( <Sheet key={variant}> <SheetTrigger asChild><Button size="sm" variant="outline">{variant}</Button></SheetTrigger> <SheetContent variant={variant} size="sm"> <SheetHeader> <SheetTitle>{variant} sheet</SheetTitle> <SheetDescription>Same content, different surface.</SheetDescription> </SheetHeader> <SheetFooter> <SheetClose asChild><Button variant="ghost">Close</Button></SheetClose> </SheetFooter> </SheetContent> </Sheet> ))} </div> )}Glass (opt-in)
variant="glass" is opt-in. It blurs and tints what sits behind the panel (with a readable opacity floor), so it needs a colourful or photographic backdrop: switch the stage backdrop to see it.
import { Button, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "@glinui/ui"
export function Demo() { return ( <Sheet> <SheetTrigger asChild><Button variant="outline">Open glass sheet</Button></SheetTrigger> <SheetContent variant="glass"> <SheetHeader> <SheetTitle>Filters</SheetTitle> <SheetDescription>The page behind stays visible through the panel.</SheetDescription> </SheetHeader> <SheetFooter> <SheetClose asChild><Button variant="ghost">Close</Button></SheetClose> </SheetFooter> </SheetContent> </Sheet> )}Glass Side Sheet
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription } from "@glinui/ui"
export function SheetGlassDemo() {
return (
<Sheet>
<SheetTrigger variant="glass">Open settings</SheetTrigger>
<SheetContent variant="glass" side="right">
<SheetHeader>
<SheetTitle>Workspace</SheetTitle>
<SheetDescription>Manage theme and team defaults.</SheetDescription>
</SheetHeader>
</SheetContent>
</Sheet>
)
}Accessibility
- Built on Radix Dialog with focus trapping.
- SheetTitle required for screen readers.
- Focus is trapped while open and restored on close.
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. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetTrigger
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
asChild | boolean | - | false | Render as child element. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetContent
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | PanelVariantProp | No | ambient style (glinr) | Panel look. Omit it for the ambient design style (glinr shell with a gradient hairline ring, elev-3). `plain` is the shadcn border and shadow, `solid` and `soft` are tonal, `glass` is opt-in and needs a backdrop. In the glinr look `SheetHeader` becomes a raised strip. Legacy `default` follows the ambient style, `frosted` maps to `glass`, `matte` to `solid`. |
size | "sm" | "md" | "lg" | No | md | Panel width/height. |
side | "top" | "bottom" | "left" | "right" | No | right | Slide-in direction. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
SheetHeader
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetTitle
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetDescription
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetFooter
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Additional class names. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
SheetClose
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
asChild | boolean | - | false | Render as child element. |
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
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-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
SheetProps
SheetContentProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
container | HTMLElement | null | No | - | Element to portal into. When set, overlay and content use absolute positioning scoped to the nearest positioned ancestor. |
side | "top" | "bottom" | "left" | "right" | No | "right" | Variant option from sheetContentVariants. |
size | "sm" | "md" | "lg" | No | "md" | Variant option from sheetContentVariants. |
variant | PanelVariantProp | No | - | Surface look. Omit for the ambient design style (glinr by default). `glass` is opt-in and needs a rich backdrop. |
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. |