Dialog
FREEModal window with sizes, a blurred backdrop, scale in/out motion and a focus trap.
Installation
Terminal
npx @bloxa/cli add dialog
# or: npx shadcn@latest add @bloxa/dialogPackages installed automatically: motion, radix-ui
Examples
Dialog with a form
Sizes
API reference
Every component also accepts the props of the element it renders.
Dialog
| Prop | Type | Default | Description |
|---|---|---|---|
| open / defaultOpen | boolean | — | Controlled or initial open state. |
| onOpenChange | (open) => void | — | Called when it opens or closes. |
DialogContent
Use with DialogHeader, DialogTitle, DialogDescription, DialogBody, DialogFooter and DialogClose.
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "sm" | "md" | "lg" | "xl" | "full" | "md" | Maximum width. |
| showClose | boolean | true | × button in the corner. |
| blur | boolean | true | Blur the backdrop. |