01
Overview
Reference usage
A status message that communicates contextual feedback and can optionally be dismissed.
Usage
You have 3 unread notifications.
02
When to use
Use when
- Surfacing the result of a just-completed action such as a save failure or success.
- Calling out a transient condition the user must notice immediately within a specific region.
Avoid when
- Communicating a page- or app-wide notice that persists across views — use a banner instead.
- Providing supplemental commentary or guidance inline with content — use a callout instead.
03
Examples
Dismissible alert
An alert with a close button that fires onDismiss.
Alert variants
Info, success, warning, and danger alerts.
Alert with icon
Custom icon slot alongside the alert message.
04
Props
Name | Type | Default | Description |
|---|---|---|---|
variant | 'info''success''warning''danger''error' | 'info' | |
dismissible | boolean | false | |
onDismiss | () => void | ||
heading | text | A bold first line in the status colour. With a heading, the alert draws its variant's glyph
when no icon is given, and children read in the default text colour as the body. | |
children required | snippet | ||
icon | snippet | ||
actions | snippet | Buttons or links that act on the message, such as "Export again" after a failed export. They sit at the alert's trailing edge beside the message, and drop under it where the alert is too narrow for both. Give them the secondary or ghost variant: an alert states a problem, and the page's one primary action stays elsewhere. |