Component
A dialog that is used to display a message to the user. It is used to display information and let the user interact with the content.
View component changelogImport all parts of the component and piece them together
The root component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | -- |
customRootClass | string | -- |
open | boolean | -- |
children | ReactNode | -- |
defaultOpen | boolean | false |
onOpenChange | function | -- |
onClickOutside | function | -- |
The trigger component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | -- |
asChild | boolean | false |
The portal component for the Dialog.
| Prop | Type | Default |
|---|---|---|
children | ReactNode | -- |
container | Element | null | -- |
forceMount | boolean | false |
keepMounted | boolean | false |
The overlay component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
asChild | boolean | false |
forceMount | boolean | false |
The content component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
asChild | boolean | false |
forceMount | boolean | false |
The title component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
The description component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
A layout container for dialog actions.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
The close component for the Dialog.
| Prop | Type | Default |
|---|---|---|
className | string | '' |
children | ReactNode | -- |
asChild | boolean | false |
| Shortcut | Description |
|---|---|
Escape | Closes the dialog when the close interaction is enabled. |
Tab | Moves focus to the next focusable element inside the dialog. |
Shift + Tab | Moves focus to the previous focusable element inside the dialog. |
| Reference | What Rad UI follows |
|---|---|
Uses modal dialog semantics with labelled content, description support, focus containment, and dismiss behavior. |