Feedback
Alert
Communicates important status messages with semantic variants, optional action slots, and accessible roles.
Usage
Anatomy
The parts and how they nest, taken from the preview above.
Examples
Semantic variants
Presents critical messages across five semantic tones with token-backed colors and contrast.
Interactive action
Interactive alerts should use role="region" with aria-labelledby to provide polite navigation landmarks.
Iconless alert
Renders without an icon slot; title and description align flush with container padding.
Description-only alert
Renders concise notification copy without a separate heading element.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Explain the status and a useful next action. Choose announcement urgency to match the message. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Alert Dialog when a decision must interrupt the task. Do not announce routine updates as urgent alerts. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | "default" | Selects the semantic visual variant and token palette. |
| | "alert" | Sets the ARIA role; defaults to assertive alert for urgent dynamic text, overridable to status or region. |
| | — | Root compound container for the alert message, icon, and action slots. |
| | — | Slot for decorative status icon; defaults to aria-hidden. |
| | — | Slot for the primary alert heading or title. |
| | — | Slot for supporting alert description text. |
| | — | Layout slot for secondary action controls. |