Dialog
A window overlaid on the primary content for focused tasks. Default width is max-w-sm (24rem). For irreversible confirmations, prefer Alert Dialog.
Basic
Edit profile with title, description, fields, and footer actions.
Installation
CLI
Also needs
npx @sonojs/ui@latest add button && npm i lucide-reactComposition
structure
Usage
dialog.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| showCloseButton | boolean | true | On DialogContent — corner X. On DialogFooter — optional outline Close. |
| size | "default" · "sm" | "default" | On DialogContent — default 24rem (`max-w-sm`); `sm` → 20rem. |
| asChild | boolean | false | On DialogTrigger / DialogClose — merge props into the child. |
| open / onOpenChange | boolean / (open: boolean) => void | — | On Dialog — controlled open state. |