25
A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
npx neobrutal add dialogimport {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"<Dialog>
<DialogTrigger render={<Button variant="neutral" />}>
Open Dialog
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</DialogContent>
</Dialog>| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | The controlled open state of the dialog. |
| defaultOpen | boolean | - | The default open state when uncontrolled. |
| onOpenChange | (open: boolean) => void | - | Event handler called when the open state changes. |
| modal | boolean | - | The modality of the dialog. When set to true, interaction with outside elements will be disabled. |
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | - | Unique identifier for the trigger when using multiple triggers. |
| render | ReactElement | function | - | Custom element to render as the trigger. |