Skip to Content

Dialog

A modal component for conveying important information or capturing user confirmation or input. Built on Base UI Dialog  with focus trap, scroll lock, and Escape-to-close by default.

Preview

Design

Examples

Size

Controls the maximum width of the dialog.

ValueDefaultDescription
smallSimple confirmation dialogs (e.g. confirm/cancel)
medium✓General forms or information dialogs
largeComplex forms or detailed content dialogs
xlargeDialogs with a lot of content
fullFull-screen dialog
Design

Rounded

Controls the corner radius of the dialog.

ValueDefaultDescription
smallSmall corner radius
medium✓Default corner radius
largeLarge corner radius

Guidelines

Confirmation dialogs

Always get user confirmation for irreversible actions (delete, reset, etc.). In such cases, include a danger intent button in actions and set closeOnOverlayClick: false.

Form dialogs

Use closeOnOverlayClick: false when the dialog contains a form. This prevents users from accidentally losing their input.

Props

Props

Prop
Default
Type
open
—
boolean
onOpenChange?
—
(open: boolean) => void
onClose?
—
() => void
size?
"medium"
"small" | "medium" | "large" | "xlarge" | "full"
rounded?
"medium"
"small" | "medium" | "large"
title?
—
string
description?
—
string
children
—
ReactNode
actions?
—
DialogAction[]
footer?
—
ReactNode
showCloseButton?
true
boolean
closeOnOverlayClick?
true
boolean
closeOnEscape?
true
boolean
Last updated on