Alert

Alerts

Alerts allow you to attract the user’s attention to important information.

They’re quite intense, so use them sparingly.

Basic alerts

Alerts only need children, and optionally a variant, which can be info (default), success, warning, or error.

Example

Alerts with actions

Adding a <button> or a link (<a>) to an alert will make it actionable. These actions will be displayed on the right side of the alert on desktop, and at the bottom on mobile.

If you add an action, it’s advisable to put the main text in a <p> tag.

Example