Fulldev UI

A sliding panel component that appears from the edge of the screen.

Installation

npx shadcn@latest add @fulldev/sheet

Usage

import {
  Sheet,
  SheetClose,
  SheetContent,
  SheetDescription,
  SheetFooter,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from "@/components/ui/sheet"
<Sheet>
  <SheetTrigger variant="outline">Open</SheetTrigger>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Are you absolutely sure?</SheetTitle>
      <SheetDescription>This action cannot be undone.</SheetDescription>
    </SheetHeader>
  </SheetContent>
</Sheet>

SheetTrigger and SheetClose render a Button and take its variant and size props. The sheet uses the Data Slot dialog: it traps focus, closes on Escape and outside click, and locks page scroll while open.

Composition

Sheet
├── SheetTrigger
└── SheetContent
    ├── SheetHeader
    │   ├── SheetTitle
    │   └── SheetDescription
    └── SheetFooter

Side

Use the side prop on SheetContent to set the edge of the screen where the sheet appears. Values are top, right, bottom, or left.

No Close Button

Use showCloseButton={false} on SheetContent to hide the close button.

RTL

Responsive activation

Pass a media query to Sheet to import and initialize its controller only while that query matches. Leaving the query destroys the controller and releases its portals and scroll lock. Returning initializes it again. A trigger click during the first download is performed once loading finishes, provided the query still matches.

The default has no breakpoint restriction. Keep the query and CSS visibility in the owning header block or site. Header blocks use fold="lg" by default and accept fold="xl"; that choice controls both visibility and activation.

API Reference

Source: src/components/ui/sheet

Sheet

PropTypeDefault
defaultOpenbooleanfalse
closeOnClickOutsidebooleantrue
closeOnEscapebooleantrue
lockScrollbooleantrue

SheetContent

PropTypeDefault
side"top" | "right" | "bottom" | "left""right"
showCloseButtonbooleantrue

See the Data Slot dialog docs for events and programmatic control.