Alert

Displays a callout for user attention.

Success! Your changes have been saved

This is an alert with icon, title and description.

Usage

You can use one of the two classes: alert or alert-dialog with any of the following children:

  • A svg icon,
  • A <h2> for the title.
  • A <section> for the description. This can include paragraphs, lists, etc.
<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>

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.