sw-ui-alert
sw-ui-alert
sw-ui-alert
Modal confirmation / alert dialog primitive built on the native
<dialog> element. Resolves a Promise with the user’s choice when used
via the companion showPrompt() helper.
Two interaction modes are selectable through the reflected type attribute:
confirm (default) — renders both Cancel and OK buttons; the
returned Promise resolves to true on accept and false on reject /
dialog close.alert — renders only OK; the Promise resolves to true once
acknowledged or the dialog is dismissed.The dialog uses the platform <dialog> element so focus management,
ESC-to-dismiss, and ::backdrop styling all come for free.
Class: SwUiAlert · Module: packages/web-components/src/components/UI/sw-ui-alert.ts
SwUiAlert, sw-ui-alerttitle field.
description field.
type field.