aura

Alert

The Alert component is used to display a message to the user. It can be used to show a success message, a warning message, an error message, or an information message.

Attributes

  • title (String): The title of the alert.
  • message (String): The message to display.
  • variant (String): The variant of the alert. Possible values are success, warning, error, and info.

Basic Usage

Default

This is a default message.

Copy to clipboard

<aura:alert title="Success" text="This is a success message." />
<aura:alert success ... />
<aura:alert variant="success" ... />

Variants

Default

This is a default message.

Success

This is a success message.

Warning

This is a warning message.

Error

This is an error message.

Info

This is an information message.

Copy to clipboard

<aura:alert success ... />
<aura:alert warning ... />
<aura:alert danger ... />
<aura:alert info ... />

Types

This is a success message.

This is a success message.

This is a success message.

Copy to clipboard

<aura:alert solid ... />
<aura:alert outline ... />
<aura:alert ghost ... />

Dismissible

Success

This is a success message.

Copy to clipboard

<aura:alert closeable ... />