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@next 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>

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.

Live playground

Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.

Generated JSX
<Sheet>
  <SheetTrigger
    className="rounded-md border px-4 py-2 text-sm font-medium"
  >Open settings</SheetTrigger>
  <SheetContent
    side="right"
  >
    <SheetHeader>
      <SheetTitle>Project settings</SheetTitle>
      <SheetDescription>Configure the generated registry output.</SheetDescription>
    </SheetHeader>
    <div
      className="p-4 text-sm"
    >Package name · output path · aliases</div>
    <SheetFooter>
      <SheetClose
        className="rounded-md border px-4 py-2 text-sm font-medium"
      >Save</SheetClose>
    </SheetFooter>
  </SheetContent>
</Sheet>

API reference

Generated from the public TypeScript exports in src/ui/sheet.tsx.

View JSON

Sheet

Component
Props: React.ComponentProps<typeof SheetPrimitive.Root>

SheetTrigger

Component
Props: React.ComponentProps<typeof SheetPrimitive.Trigger>

SheetClose

Component
Props: React.ComponentProps<typeof SheetPrimitive.Close>

SheetContent

Component
Props: React.ComponentProps<typeof SheetPrimitive.Content> & VariantProps<typeof sheetVariants>
PropTypeRequiredDefaultDescription
sidenull | "top" | "bottom" | "left" | "right"No"right"—

SheetHeader

Component
Props: React.ComponentProps<"div">

SheetFooter

Component
Props: React.ComponentProps<"div">

SheetTitle

Component
Props: React.ComponentProps<typeof SheetPrimitive.Title>

SheetDescription

Component
Props: React.ComponentProps<typeof SheetPrimitive.Description>

Accessibility contract

Machine-readable behavior and consumer responsibilities for sheet.

View JSON
Support
Primitive-managed
Pattern
modal dialog
Radix Dialog
Keyboard interactions for sheet
KeysBehavior
EscapeClose the open surface and restore focus.
Tab Shift+TabCycle focus inside the sheet.

Built-in semantics

  • Uses dialog semantics with focus trapping/restoration and title/description linkage.

Consumer responsibilities

  • Render SheetTitle and provide a labelled close control.