Sheet
Extends the Dialog component to display content that complements the main content of the screen.
Installation
npx shadcn@latest add https://exawizards.com/exabase/design/registry/sheet.json
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>
API
The Sheet
component extends the Dialog component. See the Dialog – Radix Primitives (opens in a new tab) documentation for more information.
The SheetContent
component has additional property:
Prop | Type | Defalt | Description |
---|---|---|---|
side | "top" | "right" | "bottom" | "left" | "right" | The edge of the screen where the component will appear. |
Examples
Side
Size
You can adjust the size of the sheet using CSS classes: