Alert
Prominent message box for displaying important information to users. Four variants (error, success, warning, info) with distinct color schemes and optional title. Includes ARIA role="alert" for accessibility.
Live Preview
Variants
Error Alert
Display critical errors that require user attention
Success Alert
Confirm successful actions or operations
Warning Alert
Alert users to potential issues or important information
Info Alert
Provide helpful information or tips
With Titles
Error with Title
Include a title for additional context
Error
Success with Title
Emphasize successful completion with a title
Success!
Warning with Title
Add urgency to warning messages
Warning
Info with Title
Provide contextual tips with titles
Pro Tip
Content
Long Content
Alerts handle longer messages gracefully
System Maintenance
Multiple Alerts
Display multiple alerts with different variants
Usage Guidance
✓ When to Use
Use for important user feedback: form-level errors, success confirmations, warnings about consequences, informational notices. Best placed at top of forms or content sections.
✗ When NOT to Use
Don't use for field-level errors (use FormError), status indicators (use Badge), navigation feedback (use toast notifications), or marketing callouts (use marketing components).
Props
varianttitleclassNamestylechildrenonClickonChange