Alert
Basic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { Alert } from "@corew500/ui/alert"
<Alert>Content</Alert>Variants
alertVariants
| Axis | Values | Default |
|---|---|---|
| variant | defaultdestructivesuccesswarninginfo | default |
CMS Integration
Loading...
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | enum | — | — |
Accessibility
Screen Readers
- - Uses role="alert" for destructive/warning variants (live region, interrupts screen readers)
- Uses role="status" for default/info/success variants (polite announcements)
- Icons should have aria-hidden="true" (decorative)
Additional
- Actionable alerts should have clear button labels
Localization
Translatable Content
- - Pass translated strings to AlertTitle and AlertDescription
- Action button text should be localized