Confirm Dialog

zyra-confirm-dialog

Purpose-built modal for confirm/cancel prompts — title, message, and Cancel/Confirm actions wired up on top of zyra-modal.

API

All inputs and configuration options for zyra-confirm-dialog.

PropTypeDefaultDescription
openbooleanfalseTwo-way bound visibility state via [(open)]
titlestring'Are you sure?'Dialog heading
messagestring''Body text shown when no content is projected
tone'default' | 'danger''default'Controls the Confirm button color
confirmLabelstring'Confirm'Text for the confirm button
cancelLabelstring'Cancel'Text for the cancel button
loadingbooleanfalseShows a loading state on the confirm button and disables both actions
confirmed (output)void-Emits when Confirm is clicked (dialog does not auto-close)
cancelled (output)void-Emits when the dialog is dismissed via Cancel, ESC, or backdrop click

Accessibility

Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.

  • Inherits role="dialog" and aria-modal="true" from zyra-modal
  • Focus is trapped inside the dialog while open, and ESC dismisses it
  • Cancel and Confirm buttons are disabled while loading to prevent double submission