Alert Dialog
A modal dialog that interrupts the user with important content and expects a response.
Confirm Dialog
The standard confirmation dialog.
alert-dialog-example-confirm.ts
Colored Alerts
Alert dialogs with semantic colors for error and warning states.
alert-dialog-example-colored.ts
Input Dialog
A dialog that includes input fields for user interaction.
alert-dialog-example-input.ts
API Reference
Brain API
The brain directives provide the functional logic and state management for the alert dialog.
| Directive | Selector | Inputs / Outputs |
|---|---|---|
| BrnAlertDialog | [brnAlertDialog], brn-alert-dialog | Main container directive. Inherits from BrnDialog. |
| BrnAlertDialogTrigger | button[brnAlertDialogTrigger] |
|
| BrnAlertDialogContent | [brnAlertDialogContent] | Structural directive for the dialog content. |
| BrnAlertDialogTitle | [brnAlertDialogTitle] | Directive for the accessible title. |
| BrnAlertDialogDescription | [brnAlertDialogDescription] | Directive for the accessible description. |
Installation & Usage
Installation
Imports
Basic Skeleton
Helm API
The helm directives provide the default spartan/ui styling for the alert dialog.
| Component / Directive | Selector | Description |
|---|---|---|
| HlmAlertDialog | hlm-alert-dialog | Main styling container. |
| HlmAlertDialogTrigger | [hlmAlertDialogTrigger] | Styled trigger button. |
| HlmAlertDialogContent | hlm-alert-dialog-content | Styled content area with animations and shadows. |
| HlmAlertDialogHeader | hlm-alert-dialog-header | Styled header container. |
| HlmAlertDialogFooter | hlm-alert-dialog-footer | Styled footer container for actions. |
| HlmAlertDialogTitle | [hlmAlertDialogTitle] | Styled title with semi-bold font. |
| HlmAlertDialogDescription | [hlmAlertDialogDescription] | Styled description with muted text. |
| HlmAlertDialogAction | [hlmAlertDialogAction] | Directive for the primary action button. |
| HlmAlertDialogCancel | [hlmAlertDialogCancel] | Directive for the cancel/secondary button. |