Components
Alert
Inline status message with icon, title, description, and dismissal.
Import
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'info' | 'success' | 'warning' | 'error' | 'info' | Alert type and colour |
title | string | — | Bold title line |
dismissible | boolean | false | Show dismiss button |
onDismiss | () => void | — | Called when dismiss button clicked |
children | React.ReactNode | — | Alert body content |
className | string | — | Additional CSS classes |
Controlled visibility
With actions
Accessibility
- Renders with
role="alert"for live region announcements - Icon is
aria-hidden— variant meaning is conveyed via text - Dismiss button has
aria-label="Dismiss" - Screen readers announce the alert content when it appears