Overlays
ConfirmDialog
Asks for confirmation before a destructive or irreversible action. The confirm button repeats the verb (“Delete case”), never “OK”. Say exactly what will be lost.
When to use
Confirm a destructive or irreversible action before it happens.
Use something else
Reversible actions → just do it and offer Undo in a Toast.
Do
- Say exactly what will happen and what can't be undone.
- Name the confirm button after the action (“Delete case”), never “Yes”.
Don't
- Don't confirm routine, reversible actions.
- Don't make the destructive button the default focus.
Props
| Prop | Type |
|---|---|
open | boolean |
title required | string |
tone | 'critical' | 'neutral' |
confirmLabel | string |
cancelLabel | string |
onConfirm | () => void; onCancel?: () => void; inline?: boolean; children: React.ReactNode; className?: string |
Use
const { ConfirmDialog } = window.Tessera;
const el = React.createElement(ConfirmDialog, { /* props */ });