Component
Sheet
A slide-out dashboard overlay drawer supporting all four positions (left, right, top, bottom). Features heavy black outlines and unrounded flat styling.
Preview
Installation
pnpm dlx brutx@latest add sheetUsage
import {
Sheet,
SheetTrigger,
SheetContent,
SheetHeader,
SheetTitle,
SheetDescription,
SheetFooter,
SheetClose,
} from "@/components/ui/sheet"
import { Button } from "@/components/ui/button"
<Sheet>
<SheetTrigger asChild>
<Button>Open Sheet</Button>
</SheetTrigger>
<SheetContent side="right">
<SheetHeader>
<SheetTitle>Edit Profile</SheetTitle>
<SheetDescription>
Make changes to your profile here.
</SheetDescription>
</SheetHeader>
<div className="py-4">
</div>
<SheetFooter>
<SheetClose asChild>
<Button>Save changes</Button>
</SheetClose>
</SheetFooter>
</SheetContent>
</Sheet>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" | "bottom" | "left" | "right" | "right" | The side from which the panel slides open. |
| className | string | - | Custom styling classes applied to the sheet drawer container. |
Accessibility
- Utilizes
aria-describedbyandaria-labelledbyto announce title and content. - Ensures full keyboard Esc closure and traps cursor focus layers inside active drawers.
- Restores active element focus dynamically upon closing.