chrome:shell.skip

generated:catalog.entry.alert-dialog.title

generated:catalog.entry.alert-dialog.description

@xngui/components/alert-dialog
import { XAlertDialogService } from '@xngui/components/alert-dialog';

chrome:demo.section

chrome:demo.preview

demo-preview:hints.category.focus:
Tab
demo-preview:hints.category.pointer:
Scroll
demo-preview:hints.category.shortcuts:
Escape
import { inject } from '@angular/core';
import { XAlertDialogService } from '@xngui/components/alert-dialog';
 
export class ExampleComponent {
private readonly xAlertDialogService = inject(XAlertDialogService);
 
openAlert(): void {
this.xAlertDialogService
.open({
status: 'danger',
size: 'md',
title: 'Delete project?',
content: 'This action cannot be undone. All data will be permanently removed.',
confirmLabel: 'Delete',
cancelLabel: 'Cancel',
showCancel: true,
})
.afterClosed.subscribe((result) => {
// handle result
});
}
}

chrome:demo.events.title

chrome:demo.events.empty

chrome:demo.api.title

x-alert-dialog

chrome:demo.api.col.property
chrome:demo.api.col.type
chrome:demo.api.col.default
chrome:demo.api.col.description
closeOnBackdrop
boolean
—
Dismiss when the backdrop is clicked — falls back to XConfigService when unset.
closeOnEscape
boolean
—
Dismiss when Escape is pressed — falls back to XConfigService when unset.
status
XStatus
'info'
Status tier — maps confirm button variant when `danger`.
title
string
—
Header title text.
size
XDialogSize
—
Overlay pane width — ` when unset.
confirmLabel
string
—
Confirm action button label.
cancelLabel
string
—
Cancel action button label.
showBuiltInFooter
boolean
true
When `false`, project `[xFooter]` actions and omit the preset cancel/confirm buttons.
showCancel
boolean
true
Show the cancel button when the built-in footer is enabled.
ariaLabel
string
—
Accessible name override — when set, takes precedence over the titled heading.