Alert
A block-level message attached to a region, with tone-appropriate live-region politeness.
Live preview
Source
The exact file rendered in the preview above.
components/demos/alert.tsx
components/ui/alert.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
For messages that belong to a place on the page and should stay there. If the message is transient and unrelated to a region, use Toast instead.
- Danger uses `role="alert"` and interrupts; every other tone uses the polite `role="status"`.
- Put the recovery action in the alert — an error without a next step is just bad news.
- Never rely on the tint alone: each tone ships a distinct icon and a title.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Info
- Success
- Warning
- Danger
- Neutral
- With actions
Accessibility
- Politeness
- Derived from tone by default, and overridable with `live` when the caller knows better.
- Icons
- Icons are `aria-hidden`; the tone is carried by the words.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsToast
Transient notifications in a single polite live region, with pinned errors and an optional undo action.
intermediateFeatured6 variantsStatus
System state as icon plus label plus colour — never colour alone.
starter4 variantsBadge
Compact labelling with seven tones, three appearances and an optional second, colour-independent signal.
starter6 variants