GitHub

Alert

Displays important messages with contextual styling

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { Alert } from "@corew500/ui/alert"

<Alert>Content</Alert>

Variants

alertVariants

AxisValuesDefault
variant
defaultdestructivesuccesswarninginfo
default

CMS Integration

CMSPayload CMS Integration
This component supports CMS-driven content via @corew500/cms-payload.
Loading...

API Reference

Props

PropTypeDefaultDescription
variantenum

Accessibility

Screen Readers

  • - Uses role="alert" for live region announcements
  • Content is announced immediately to screen readers
  • 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