010
Sheet
OverlayNot opened
Customize
Side
Code
const [open, setOpen] = useState(false);
<Button onClick={() => setOpen(true)}>Open</Button>
<Sheet open={open} onOpenChange={setOpen}>
<SheetHeader>
<SheetTitle>Settings</SheetTitle>
<SheetClose />
</SheetHeader>
…
</Sheet>Install
npx shadcn@latest add https://components.haedong.dev/r/sheet.json
Props
Sheet props below. SheetHeader is a baseline row; SheetTitle labels the dialog; SheetClose is a muted text button (children = label, default "Close"). Renders through a portal into <body>.
| Prop | Type | Description |
|---|---|---|
| open | boolean | Controlled visibility. |
| onOpenChange | (open: boolean) => void | Called with false on Esc, backdrop click or SheetClose. |
| side | "right" | "left" | Edge the panel attaches to; the hairline sits on that edge. Defaults to "right". |
| aria-label | string | Labels the dialog when there is no SheetTitle. |
| className | string | Extra classes for the panel (default width w-80, max-w-full). |