Variants

Use the variant attribute to set the alert color: primary, success, neutral, warning, danger.

This is super informative
You can tell by how pretty the alert is.
Your changes have been saved
You can safely exit the app now.
Your settings have been updated
Settings will take effect on next login.
Your session has ended
Please login again to continue.
Your account has been deleted
We're very sorry to see you go!

Closable

Add the closable attribute to show a close button. The alert reopens after 2 seconds.

You can close this alert any time!

Without Icons

The icon slot is optional — omit it for a plain text alert.

Nothing fancy here, just a simple alert.

Duration (Auto-hide)

Set the duration attribute (milliseconds) to automatically hide the alert after a period of time.

Show Alert (3 s)
This alert will automatically hide itself after 3 seconds.

Toast Notifications

Call the toast() method to show the alert as a toast notification in the top-right corner.

Primary Success Neutral Warning Danger
This is super informative
You can tell by how pretty the alert is.
Your changes have been saved
You can safely exit the app now.
Your settings have been updated
Settings will take effect on next login.
Your session has ended
Please login again to continue.
Your account has been deleted
We're very sorry to see you go!