Search

Search documentation

Sheet

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

Installation

pnpm dlx shadcn@latest add @evolphin/sheet

Usage

import {
  Sheet,
  SheetContent,
  SheetDescription,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from "@/components/ui/sheet";
<Sheet>
  <SheetTrigger>Open</SheetTrigger>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Are you absolutely sure?</SheetTitle>
      <SheetDescription>
        This action cannot be undone. This will permanently delete your account
        and remove your data from our servers.
      </SheetDescription>
    </SheetHeader>
  </SheetContent>
</Sheet>

Type Definitions

interface SheetContentProps {
  /** The edge of the screen where the sheet appears */
  side?: "top" | "bottom" | "left" | "right";
SheetContentProps.side?: "top" | "bottom" | "left" | "right" | undefined

The edge of the screen where the sheet appears

}

Examples

Default

Side

API Reference

Sheet

PropTypeDefaultDescription
openboolean-The controlled open state of the sheet.
defaultOpenboolean-The default open state when uncontrolled.
onOpenChange(open: boolean) => void-Event handler called when the open state changes.
modalbooleantrueThe modality of the sheet.

SheetTrigger

PropTypeDefaultDescription
asChildbooleanfalseChange the component to the HTML tag or custom component of the only child.

SheetContent

PropTypeDefaultDescription
side`"top" \"right" \"bottom" \
classNamestring-Additional CSS classes

SheetClose

PropTypeDefaultDescription
asChildbooleanfalseChange the component to the HTML tag or custom component of the only child.

On this page