Alert
Visible feedback with explicit none, polite, or assertive announcement policy.
When to use it. Use it for authored feedback whose announcement urgency is selected deliberately.
Alert primary example
How it works
-
<.alert>The caller's native elements, names, and document relationships remain authoritative. -
package CSSPackage CSS applies scoped shadcn-style tokens, layout, focus, and state presentation without changing the native contract. -
gallery onlyTheme switching, source copying, search, fixtures, and inspection controls on this page belong to the gallery only; :alert does not ship them. -
application boundaryShadcnUI does not add application state, authorization, persistence, transport events, or a JavaScript behavior layer to this component.
Examples use package semantic tokens in explicit light and dark scopes.
Accessibility and browser support
Destructive color does not infer urgency; announcement policy determines role and live state.
| Feature | Locked-engine evidence | When missing |
|---|---|---|
| Native baseline | Reviewed in the locked Chromium, Firefox, and WebKit evidence matrix. | Title, description, and native actions remain available without JavaScript. |
| Exact fallback | The locked-engine matrix retains the documented native or static outcome. | Title, description, and native actions remain available without JavaScript. |
Application ownership and API
The application owns insertion, dismissal, retry, lifecycle, and action outcomes.
Provenance
Catalogue identity foundation.alert, adapted from
unscripted/ui commit bd8f403030c8d1f46804da6eda733fde7e908e63
under its MIT notice.
The documentation presentation is adapted locally; ShadcnUI's Phoenix API and native semantic contract remain authoritative.
Adapt native alert markup into a stateless HEEX API with explicit announcement semantics and caller-owned lifecycle.