Skip to content

Multi-step confirm ​

Two steps: acknowledge that it cannot be undone, then confirm again.

Open in demo
Open in demo

Usage ​

Step one is a checkbox reading "I understand this action cannot be undone." Continue stays disabled until it is ticked. Step two says "This is your last chance to back out" and names the button that will do it.

Both steps reset every time the dialog opens, so a tick left over from a previous attempt cannot skip the acknowledgement.

Reach for it where the action is broad rather than specific: resetting a whole workspace, rotating every key, wiping an environment. Where the thing has a name, the destructive confirm asking the reader to type it is the stronger guard, because it proves they know which thing.

Examples ​

Through useConfirm ​

variant: 'multi-step' is all it takes. Unlike the destructive variant, the title is not rewritten: it stays as the heading.

API ​

Source: src/shared/components/feedback/MultiStepConfirm.vue

Props ​

PropTypeDefaultDescription
openbooleanrequiredYou own it.
titlestringrequiredThe heading, drawn in the destructive color.
descriptionstring—The body.
confirmLabelstring'confirm.confirm'The final button, and the name printed in the last-chance line.
cancelLabelstring'confirm.cancel'Defaults to "Cancel".

Emits ​

EventPayloadDescription
update:openvalue: booleanfalse on Escape or an overlay press.
confirm—Only from the second step.
cancel—The cancel button, on either step.

Slots ​

None.

Accessibility ​

  • The acknowledgement is a checkbox inside a <label>, so the whole row is the hit area and the sentence is the checkbox's name.
  • Continue is genuinely disabled until the box is ticked.
  • Cancel stays available on both steps, so there is always a way out that is not Escape.
  • The last-chance line names the exact button that follows, rather than saying "the button below".
  • The title and description carry dir="auto", as on the plain confirm.