stnd.build

Alert

Inline notification banner. Wraps the global .alert CSS class — use the class prop for semantic color variants.

Type Name Description
string class? Semantic intent: “success” | “warning” | “error” | “info”. Defaults to accent color.
string title? Optional bold title.
string icon? Optional string icon (e.g. “✓”, “⚠”).
string style? Extra inline style.
“alert” | “status” role? What a screen reader does with it: alert interrupts, status waits its turn. Defaults to alert for “error” and “warning”, status otherwise.
import(‘svelte’).Snippet children? Banner content.
<Alert>Basic message</Alert>
<Alert class="success" icon="✓" title="Saved">Changes saved.</Alert>
<Alert class="error" icon="✕" title="Failed">Something went wrong.</Alert>