AlertDialog
Catalyst-style confirmation dialog: a centered panel over a dimmed, blurred backdrop, with a title, description, optional body, and action buttons. Reserve it for decisions that must block the rest of the app.
Browser Escape and iOS accessibility escape cancel the dialog, clear its confirmation field and request open=false. The confirmation text gates only the confirm action; cancellation remains available while confirm is disabled. An open child overlay handles dismissal first. A controlled owner can refuse closure without passing that request to a parent or calling onConfirm.
iOS
Android
Web
tsx
Default
Narrow
Small
Large
Body field
Controlled
Props
Do & Don’t
Reserve the dialog for blocking decisions
Don’t
A blocking alert dialog for passive confirmation interrupts the user for no reason.
Do
Saved
Your changes have been saved.
Use an inline banner or toast for passive feedback; reserve the dialog for decisions that must be confirmed.
Name the action on the confirm button
Don’t
Generic Yes / No forces the user to re-read the title to know what they are confirming.
Do
Label the confirm button with the verb it performs (Delete, Archive, Sign out).
xs
Don’t
A long title, multi-line description, and wordy buttons get cramped in the xs width and wrap awkwardly.
Do
Reserve xs for a terse one-line question with short button labels and no body content.
sm
Don’t
Packing a multi-field form into sm makes it feel like a form crammed into a confirmation popup.
Do
Use sm for a single short confirmation with a one-line description; move real forms to a full dialog.
md
Don’t
Squeezing a description-carrying confirm into a smaller width crowds the copy against the edges.
Do
md is the default home for a typical destructive confirm with a sentence or two of description.
lg
Don’t
A bare yes/no in lg leaves a wide, empty panel that reads as heavier than the trivial decision it asks for.
Do
Reserve lg for dialogs that earn the width: a body field or a longer explanation to read.