Sheet
A modal side panel docked to any edge with directional motion, header/footer primitives, and RTL.
Installation#
pnpm dlx shadcn@latest add @davinciui/sheetUsage#
Composition
A trigger opens a modal panel docked to any edge. Header, title, description, footer, and close primitives compose inside — unlike the draggable Drawer, Sheet is a true modal with directional enter and exit motion.
Composition#
Use the following composition to build a Sheet:
Sheet
├── SheetTrigger
└── SheetContent
├── SheetHeader
│ ├── SheetTitle
│ └── SheetDescription
├── SheetFooter
└── SheetCloseAPI Reference#
| Prop | Type | Default |
|---|---|---|
SheetContent · sidePanel edge with directional enter/exit motion. | "top" | "right" | "bottom" | "left" | "right" |
SheetContent · showCloseButtonCorner X button. | boolean | true |
SheetTriggerOpens the panel. Accepts asChild. | button | — |
SheetCloseCloses the panel. Accepts asChild. | button | — |
SheetHeaderTitle + description stack. | div | — |
SheetFooterAction row pinned to the panel end. | div | — |
SheetTitleAccessible panel title. | h2 element | — |
SheetDescriptionAccessible panel description. | p element | — |
classNameExtra classes per part. | string | — |
Accessibility#
Built on Base UI Dialog, so focus is trapped while open, Escape closes the panel, focus returns to the trigger, and SheetTitle and SheetDescription provide the accessible name and description. The default close button has an aria-label of Close.
Motion#
The overlay fades over 200ms and the panel slides from its chosen side over 300ms using CSS transitions driven by starting and ending data styles. There is no prefers-reduced-motion handling, so the directional slide always runs.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

