Dialog focuses user's attention on additional information and a specific action.
Use the info variant to convey complex information that doesn’t fit into a simple Confirmation Dialog
such as lists, tables, and other longer messages.
The info variant has the x
in the upper right, and is dismissible by clicking outside of the dialog (this is because we’re not worried about losing user’s inputs).
Use the form variant whenever the user needs to complete form fields within the body of the dialog.
The form variant does not have the x
, and should not be dismissible by clicking outside of the dialog (we don’t want to lose the users’ progress).
Name | Default | Description |
---|---|---|
isOpen | false | boolean Determines whether dialog is open. |
variant | — | "info" | "form" Dialog variant. |
title | — | string Dialog title. |
children | — | ReactNode Dialog content. |
actions | — | ReactNode Actions to be displayed in the dialog footer. |
width | "md" | "xs"
| "sm"
| "md"
| "lg"
| "xl"
| "2xl"
| "3xl"
| "4xl"
| "5xl"
| "6xl"
| "auto" Dialog width. |
height | "auto" | ModalContentProps["height"] Dialog height. |
maxHeight | "60vh" | ModalContentProps["maxHeight"] Maximum height of the dialog content. It is recommended to keep the max height at 60vh. |
onClose | — | () => void Callback for when dialog is closed. |