Aliases
inline alert, notice
AlertInline message with optional actions and dismissal.
Needs one more sign-off.
Toast for transient feedback and Dialog for a required decision.Aliases
inline alert, notice
Foundations
Alert for persistent inline status, warnings, and success messages near the affected content.Alert for transient feedback that can safely disappear; use Toast instead.Alert when the user must stop and decide before continuing; use Dialog instead.message shell
root Carries tone, border, and background treatment.
supporting icon slot
icon Optional semantic cue before the copy.
message heading
title Short summary of the status or issue.
supporting copy
description Clarifies impact or next steps.
follow-up actions
actions Optional action area for repair or progression.
| Name | Type | Default | Description |
|---|---|---|---|
tone | 'brand' | 'success' | 'warning' | 'danger' | 'brand' | Chooses the semantic message tone. |
title | string | — | Primary alert heading. |
description | string | — | Supporting alert copy. |
dismissible | boolean | false | Shows a dismiss control. |
onDismiss | () => void | — | Receives dismissal. |
theme | ThemeContract | — | Sets the theme used to resolve component styles. |
| Name | Payload | Description |
|---|---|---|
dismiss | void | Fires when the alert is dismissed. |
| Name | Description |
|---|---|
icon | Optional icon or symbol reinforcing the tone. |
actions | Optional inline follow-up actions. |
default | Optional custom body content when the title/description pair is not enough. |
Variants
brand: Informational or product-state messaging.success: Positive confirmation with lower urgency.warning: Needs attention but does not necessarily block progress.danger: High-risk or blocking issue state.Sizes
default: Alert uses one structural size and relies on content length and tone.States
dismissed: Optional removed state after the user dismisses the alert.Semantics
Keyboard
Screen readers
Caveats
Checklist
A neutral inline alert with one clear message.
<Alert tone="brand" title="Review required" description="This workspace needs one more sign-off." /> Add actions when the user can resolve the issue immediately.
<Alert tone="warning" title="Missing details" description="Add the ship date before publishing."><svelte:fragment slot="actions"><Button size="sm">Add date</Button></svelte:fragment></Alert> Use dismiss only when hiding the message is safe.
<Alert tone="success" title="Changes saved" dismissible={true} /> Calculated fixtures; browser evidence is not collected. Layout estimates use declared text behavior and maximum token values.
tone=neutral
tone=brand
tone=success
tone=warning
tone=danger