Alert for Angular
Introduction
Section titled “Introduction”Prominent message block for page- or section-level status (info, success, warning, error) with a tone icon, a visually hidden localized tone prefix, optional title, actions, and dismiss button. Static by default; opt-in live role (status or alert) for messages inserted or changed after load.
- Four tonesInfo, success, warning, and error, each with its own icon and color.
- ActionsOptional buttons report their value, so the alert can offer the next step.
- DismissibleA close button removes the alert through a dismiss event you can cancel.
- Live announcementsChoose polite or assertive announcement for alerts that appear later.
Behavior, design tokens, and limitations are described on the Alert page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { AuiAlert } from '@absoluteui/angular/alert';
@Component({ selector: 'app-save-status', imports: [AuiAlert], template: `<aui-alert tone="error" live="assertive" title="Could not save" [message]="message" [dismissible]="true" [actions]="actions" (action)="onAction($event.value)"></aui-alert>`,})export class SaveStatusComponent { readonly message = 'Check your connection and try again.'; readonly actions = [{ label: 'Retry', value: 'retry' }]; onAction(value: string): void { if (value === 'retry') { // retry the save } }}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiAlert } from '@absoluteui/angular/alert';Defaults for every instance: provideAbsoluteUIConfig({ components: { alert: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-alert>
Section titled “<aui-alert>”Class AuiAlert; template reference #ref="auiAlert".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
message |
string | Node |
Message; strings render as text. | |
tone |
AlertTone |
'info' |
Tone: icon, colors, and hidden tone prefix. |
title |
string |
Optional title (text). | |
live |
AlertLive |
'off' |
off: static; polite: role=status; assertive: role=alert. Announces content inserted or changed after load. |
actions |
readonly AlertAction[] |
Buttons { label, value, variant? } that emit aui-action. | |
icons |
Partial<AlertIcons> |
Icon slot overrides. | |
dismissible |
boolean |
false |
Render a dismiss button (localized ‘Dismiss’). |
locale |
string |
'en-US' |
Locale of the tone prefix and dismiss label. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(action) |
AlertActionDetail |
An action button was activated. Re-emits aui-action. |
(dismissed) |
AlertDismissDetail |
Before the alert hides; preventDefault keeps it visible. Re-emits aui-dismiss. |
Read-only state
Section titled “Read-only state”| Property | Type | Description |
|---|---|---|
isDismissed |
Signal<boolean> |
Whether the alert was dismissed (hidden). |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
dismiss(): boolean | undefined |
Emit cancelable aui-dismiss, then hide unless prevented. Returns whether it was dismissed. |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: WAI-ARIA APG Alert pattern (role=alert) for urgent dynamic messages; role=status for polite updates; plain content when static.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Alert: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.