Confirm Dialog
Overlays · ConfirmDialog
Asks before a destructive or hard-to-undo action. Focus starts on Cancel; Esc cancels.
Props: open, title (a question naming the thing), text (what happens), danger, icon, confirmLabel (a verb: "Delete domain", never "OK"), cancelLabel, confirmText (type-to-confirm), onConfirm, onCancel.
- Prefer undo over confirm: removing a list item is instant with an Undo toast; confirm only when undo is impossible or the blast radius is large.
- Use
confirmTextonly for irreversible deletes of whole things (a domain, a workspace). - Renders into document.body, so it sits above every stacking context.
Props
ConfirmDialog
| Prop | Type | Notes |
|---|---|---|
open | boolean | Required |
title | string | Required |
text? | string | |
danger? | boolean | |
icon? | IconName | |
confirmLabel? | string | |
cancelLabel? | string | |
confirmText? | string | |
onConfirm | () => void | Required |
onCancel | () => void | Required |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |