Sheet

Edge-anchored sliding panel (left/right/top/bottom) on Dialog primitives.

Sheet is a panel that slides in from any screen edge — filters, detail panes, navigation drawers. It rides the Dialog primitives (focus trap, Escape/overlay dismissal) with directional slide-in animations.

Installation

import {
  Sheet, SheetTrigger, SheetClose, SheetContent,
  SheetHeader, SheetTitle, SheetDescription, SheetFooter,
} from "@iammikz/srui";

Usage

Exports

ExportNotes
SheetRoot; open/onOpenChange for controlled use
SheetTrigger / SheetCloseToggle/target closes (asChild supported)
SheetContentThe panel; side ("right" default), showCloseButton
SheetHeader / SheetTitle / SheetDescription / SheetFooterStructure

Accessibility

Full Dialog semantics: role="dialog" with labelled title/description, initial focus trap, Escape and overlay dismissal returning focus to the trigger.

Upgrades over the PRUI original: all four edges in one side prop and a showCloseButton escape hatch when the footer owns dismissal.