Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Sheet

Extends the Dialog component to display content that complements the main content of the screen.

Installation

npx logic2b@latest add sheet

Usage

import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from "@/components/ui/sheet"

<Sheet>
  <SheetTrigger>Open</SheetTrigger>
  <SheetContent side="right">
    <SheetHeader>
      <SheetTitle>Edit profile</SheetTitle>
      <SheetDescription>Make changes to your profile here.</SheetDescription>
    </SheetHeader>
  </SheetContent>
</Sheet>

API

Prop Type Default
side (SheetContent) top | bottom | left | right right

Examples

From any side

Accessibility

Sheet is built on Radix Dialog, so it inherits the WAI-ARIA modal dialog behavior.

  • Focus is trapped inside the sheet while open and returns to the trigger on close.
  • Esc or a click on the overlay closes the sheet.
  • Content behind the sheet is inert and hidden from screen readers.
  • Include a SheetTitle (and ideally a SheetDescription) so the dialog is properly labelled.