Skip to main content

Alert

Display important messages and notifications. Supports multiple variants with icons and full RTL support.

Preview

Installation

Usage

Examples

Default

tsx

Destructive

tsx

Success

tsx

Warning

tsx

Without Icon

tsx

Props

NameTypeDefaultDescription
variant
"default" | "destructive" | "success" | "warning""default"Visual style variant of the alert

Accessibility

ARIA Roles

The Alert component uses role="alert" to announce important messages to screen readers.

Semantic HTML

Uses semantic heading elements for titles to maintain proper document structure.

Color Independence

Icons and text provide information redundancy, not relying solely on color.

RTL Considerations

The Alert component is fully RTL-compatible using logical properties.

LTR (English)

RTL (العربية)

Related Components