Alert

Displays a callout for user attention.

Success! Your changes have been saved

This is an alert with icon, title and description.

This Alert has a title and an icon. No description.

This is an alert with icon, title and description.

Unable to process your payment.

Please verify your billing information and try again.

  • Check your card details
  • Ensure sufficient funds
  • Verify billing address

Usage

Use the alert or alert-destructive.

<div class="alert">
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
    <circle cx="12" cy="12" r="10" />
    <path d="m9 12 2 2 4-4" />
  </svg>
  <h2>Success! Your changes have been saved</h2>
  <section>This is an alert with icon, title and description.</section>
</div>

The component has the following HTML structure:

<div class="alert">
Main container. Use alert for default styling or alert-destructive for error states.
<svg> Optional
The icon.
<h2>
The title.
<section> Optional
The description.

Examples

Destructive

Something went wrong!

Your session has expired. Please log in again.

No description

This is a very long alert title that demonstrates how the component handles extended text content and potentially wraps across multiple lines

No icon

Success! Your changes have been saved

This is an alert with icon, title and description.