A ux-alert can be used to display a message to the user. The alert color and icon can
be used to indicate a status such as success, warning or error.
To display an icon in the alert add an icon from our icon set and apply the
uxAlertIcon directive.
The following can be used to customize the appearance and behavior of the alert:
Defines the background and foreground color of the alert. Valid types are:
info,
error,
warning,
success
and
dark.
Defines whether or not the dismiss button is visible.
To set a background color that is not included in the predefined types, this property can be
used to set the background color using a color from our color palette or a CSS color value.
To set a foreground color that is not included in the predefined types, this property can be
used to set the foreground color using a color from our color palette or a CSS color value.
Define a custom aria label for the alert dismiss button.
This event will emit when the dismiss button is clicked.
The example above can be created using the following code: