Alert
The inline status block: a start bar, a status glyph, a word lead, the message and an optional action, on the page ground with no fill.
import { Alert } from '@fairgarden/design/feedback/alert'
status is required; without it, or without any words, nothing renders. The glyph's accessible name is the status in words, so status is never shape or color alone. role is status (polite), or alert for danger.
Statuses
Statuses
Each status has its own shape and scale: info ○ indigo, success ● green, warning ▲ amber, danger ◆ red. title is the run-in lead; action is normally a Retry Button.
Primary and secondary
Primary and secondary
The status computes the secondary scale; an explicit secondary overrides it. primary sets the text ink.
On grounds
On paper, forest and leaf
API Reference
The inline status block: start bar, status glyph (custom §1.5.4 shape with its inner mark), word lead, message and optional action, on the page ground with no fill.
role defaults to status (polite) and to alert for danger (§10.20);
pass role="status" for a danger notice that does not block the task.
Renders nothing when status is missing, or when there is neither a
title nor children: a status block needs a status and words (§1.5.4,
§10.20), and an empty live region must not be announced.
| Prop | Type | Description |
|---|---|---|
action | | An optional action, normally a Retry Button ( |
status | | Required by §10.20 (no default). Optional in the type only so a bare
|
statusLabel | | The glyph’s accessible name; defaults to the English status word. |
title | | The |
AlertProps
Props for Alert: div props (without title), render, the status, lead, action and color axes.
type AlertProps = Omit<useRender.ComponentProps<'div', {}, HTMLProps>, 'title'> &
VariantProps<__type> & {
status?: AlertStatus;
title?: React.ReactNode;
action?: React.ReactNode;
statusLabel?: string;
}AlertStatus
type AlertStatus = 'info' | 'success' | 'warning' | 'danger'Specification: DESIGN-SYSTEM.md §10.20 (alert) and §1.5.4 (status).