A window that appears on top of the main window or another dialog, disabling interaction with the background content.
@radix-ui/react-dialog lucide-reactInstall the following dependencies:
The Dialog component is based on @radix-ui/react-dialog and supports all of its props. And adds:
Root component that controls all the parts of a dialog.
| Prop | Type | Default |
|---|---|---|
| modal | boolean | true |
| defaultOpen | boolean | - |
| open | boolean | - |
| onOpenChange | function | - |
A button that opens the dialog.
| Prop | Type | Default |
|---|---|---|
| asChild | boolean | false |
| Data attribute | Values |
|---|---|
| [data-state] | "open" / "closed" |