AlertDialog
Ask for explicit confirmation before a critical or irreversible action.
Basic usage
Explain the consequence in Description and place exactly one CancelTrigger before ActionTrigger. Initial focus lands on Cancel, and clicking outside keeps the dialog open.
API
Key props and defaults.
| Prop | Values and behavior | Default |
|---|---|---|
Root.open / onOpenChange | boolean / ({ open }) => void | — |
Root.closeOnEscape | boolean | true |
Content.size | sm | md | lg | sm |
CancelTrigger.children | JSX.Element | Cancel |
ActionTrigger.onClick | (event) => void | — |