Skip to content

Dialog

A modal window for a focused task. Esc, the close button or a click outside closes it, and focus goes back to the button that opened it.

Sourcecomponents/dialog.tsx

Usage

When to use

Use when

A focused task the user starts and finishes in place: edit a record, a short form. Always give it a DialogTitle; primary action last in DialogFooter

Don’t use when

Confirming an irreversible action (use Alert Dialog); long multi-step flows (use a page); messages that need no input (use Alert or a toast)