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 sheet

Usage

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

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right""right"The side from which the panel slides open.
classNamestring-Custom styling classes applied to the sheet drawer container.

Accessibility

  • Utilizes aria-describedby and aria-labelledby to announce title and content.
  • Ensures full keyboard Esc closure and traps cursor focus layers inside active drawers.
  • Restores active element focus dynamically upon closing.