01
Overview
A status message that communicates contextual feedback and can optionally be dismissed.
Usage
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 | Required | Bindable | Description |
|---|---|---|---|---|---|
variant | 'info''success''warning''danger''error' | 'info' | |||
dismissible | boolean | false | |||
onDismiss | () => void | ||||
children | snippet | req | |||
icon | snippet |