generated:catalog.entry.alert-dialog.title
generated:catalog.entry.alert-dialog.description
@xngui/components/alert-dialogimport { XAlertDialogService } from '@xngui/components/alert-dialog';chrome:demo.section
chrome:demo.preview
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
closeOnBackdropboolean—Dismiss when the backdrop is clicked — falls back to XConfigService when unset.
closeOnEscapeboolean—Dismiss when Escape is pressed — falls back to XConfigService when unset.
statusXStatus'info'Status tier — maps confirm button variant when `danger`.
titlestring—Header title text.
sizeXDialogSize—Overlay pane width — ` when unset.
confirmLabelstring—Confirm action button label.
cancelLabelstring—Cancel action button label.
showBuiltInFooterbooleantrueWhen `false`, project `[xFooter]` actions and omit the preset cancel/confirm buttons.
showCancelbooleantrueShow the cancel button when the built-in footer is enabled.
ariaLabelstring—Accessible name override — when set, takes precedence over the titled heading.