Sheet

A panel that slides in from an edge of the window.

Installation

pnpm dlx shadcn@latest add @cupertinoui/sheet

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

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

<Sheet>
  <SheetTrigger>Show Inspector</SheetTrigger>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Inspector</SheetTitle>
    </SheetHeader>
  </SheetContent>
</Sheet>

Examples

Sides

API Reference

Every part forwards the props of the underlying Base UI Dialog part. The props below are the ones CupertinoUI adds or changes.

SheetContent

PropTypeDescription
side"top" | "right" | "bottom" | "left"
Default: "right"
The edge the sheet slides in from.
showCloseButtonboolean
Default: true
Shows a close button.
classNamestringExtra classes, merged with the component's own.