AUI

Alert Dialog

A dialog that requires user response to proceed.

Discard draft?

You can't undo this action.

<button type="button" command="toggle-popover" commandfor="example" data-color="red">Discard Draft</button>

<a-alert-dialog id="example" popover="manual">
	<h2 slot="label">Discard draft?</h2>
	<p slot="description">You can't undo this action.</p>
	<button-group>
		<button type="button" popovertarget="example" popovertargetaction="toggle">Cancel</button>
		<button type="button" popovertarget="example" popovertargetaction="toggle" data-color="red">Discard</button>
	</button-group>
</a-alert-dialog>

<script>
import { AlertDialogElement } from "@jsxtools/aui/elements/alert-dialog"

customElements.define("a-alert-dialog", AlertDialogElement)
</script>

CSS Parts

CSS parts allow for fine-grained styling and theming. They target specific elements inside the component. An element may have multiple parts, and a part may be used on multiple elements.

Name Description
label The label within the alert dialog
description The description within the alert dialog