Components

Sheet

A panel that slides in from any edge of the screen to hold supplementary content, forms, or navigation without leaving the current page.

Basic usage

Compose a SheetTrigger and SheetContent. The Radix root manages open state for you — no useState required.

Sides

Set side on SheetContent to choose the edge the panel enters from. Left and right panels span the viewport height; top and bottom span its width.

Header and footer

SheetFooter pins itself to the bottom of the panel — ideal for a primary action paired with a SheetClose dismiss button.

Props

PropTypeDefaultDescription
SheetRootStateful container. Accepts open / defaultOpen / onOpenChange for controlled or uncontrolled use.
SheetTriggerTriggerElement that toggles the sheet. Pass asChild to render your own Button instead of the default trigger.
SheetContentContentThe sliding panel. Renders inside a portal over a dimmed overlay and includes a built-in close button.
side'top' | 'right' | 'bottom' | 'left''right'Edge the panel slides in from. Set on SheetContent.
SheetHeaderdivTop region for the title and description.
SheetTitleTitleAccessible label for the panel. Required for screen-reader announcements.
SheetDescriptionDescriptionSupporting text linked to the panel via aria-describedby.
SheetFooterdivBottom region pinned to the base of the panel for actions.
SheetCloseCloseDismisses the sheet. Use asChild to wrap a custom Button.
classNamestringAdditional Tailwind classes merged onto any sub-component.

Accessibility

  • Built on Radix Dialog: the panel is a modal role="dialog" with focus trapped inside while open and restored to the trigger on close.
  • Always include a SheetTitle — it provides the aria-labelledby name announced to screen readers; SheetDescription wires up aria-describedby.
  • Pressing Esc or clicking the dimmed overlay closes the sheet; the built-in close button carries a visually hidden "Close" label.
  • Content outside the open panel is inert and hidden from assistive technology, keeping keyboard navigation scoped to the sheet.