Skip to content

Confirm

Imperative confirmation dialog based on Promises, reusing oas-modal under the hood.

Basic usage

Basic usage

Open confirm

Custom text

Custom text

Custom button text

Cancel handling

Cancel handling

Confirm delete (cancel-aware)

Clear all

Clear all

Open three confirmsClear all

API

Methods

MethodDescription
confirm({ title?, content?, okText?, cancelText? })Opens a confirm dialog, returns Promise<void>; resolves on OK, rejects on cancel
destroyAllConfirm()Close all confirm dialogs
  • Reuses oas-modal; Esc / mask / cancel button all close it.
  • OK and cancel internally dispatch the oas-ok / oas-cancel events.