Alert
Variants
SYNC ACTIVE
Pulling latest telemetry from node-07.
UPLINK ESTABLISHED
Handshake complete in 240ms.
DEGRADED SIGNAL
Packet loss exceeds 8% on the backup channel.
LINK LOST
Telemetry stream dropped.
Without a title
Dismissible
MAINTENANCE WINDOW
Activating Dismiss calls onDismiss, and the application removes the alert, Dismiss included. Keyboard
focus was on that button, so move it to the next logical control: the one that restores or replaces
the alert, as in the example, or the control the alert was about. Otherwise focus falls to the page.
Props
| PROP | TYPE | DEFAULT | REQUIRED |
|---|---|---|---|
variantSeverity. Drives icon, accent color, and ARIA role (error/warning = alert, info/success = status). | enuminfo | success | warning | error | — | yes |
titleOptional uppercase heading shown above the description. | string | — | no |
dismissibleRender a trailing Dismiss button that calls onDismiss. | boolean | false | no |
onDismissCalled when the Dismiss button is activated. | function | — | no |
Accessibility
errorandwarninguse assertiverole="alert";infoandsuccessuse politerole="status".- A polite status region that is inserted together with its text is not announced: NVDA in Chrome
said nothing for a plain
<div role="status">added to the page with its text. AninfoorsuccessAlert that is added to a page that is already running therefore holds its text back from assistive technology for 100 ms, so the text arrives in a region the reader already has (the alert is drawn at once). An Alert that is in the page's first markup is content and is read where it is. To announce a change in aninfoorsuccessalert that stays on the page, replace its children; for a transient confirmation use Toast, which writes its announcement into a live region only after that region is on the page. - Write the message of an
errororwarningalert as text. NVDA says the text of an alert when it appears but leaves out a list inside it: an alert with a title and a list was spoken as the title alone. - A long title or message wraps inside the alert, and Dismiss stays inside it.
- Icons and titles convey severity alongside color.
- The “Dismiss” button supports Enter/Space and a visible focus ring.
Manifest entry
<Alert variant="error" title="LINK LOST">Telemetry stream dropped.</Alert>View agent manifest
{
"description": "Inline status message with a severity icon, semantic left-edge accent, optional title, and optional dismiss control.",
"props": {
"variant": {
"type": "enum",
"values": [
"info",
"success",
"warning",
"error"
],
"required": true,
"description": "Severity. Drives icon, accent color, and ARIA role (error/warning = alert, info/success = status)."
},
"title": {
"type": "string",
"description": "Optional uppercase heading shown above the description."
},
"dismissible": {
"type": "boolean",
"default": false,
"description": "Render a trailing Dismiss button that calls onDismiss."
},
"onDismiss": {
"type": "function",
"description": "Called when the Dismiss button is activated."
}
},
"slots": {
"children": {
"type": "any",
"required": false
}
},
"composable_with": [
"Card",
"CardBody"
],
"never_inside": [
"Alert",
"Button",
"Badge"
],
"example": "<Alert variant=\"error\" title=\"LINK LOST\">Telemetry stream dropped.</Alert>"
}