ui:message

Represents a message of varying severity levels

The severity attribute indicates a message's severity level and determines the style to use when displaying the message. If the closable attribute is set to true, the message can be dismissed by pressing the × symbol.

This example shows a confirmation message that can be dismissed.

<ui:message title="Confirmation" severity="confirm" closable="true">
      This is a confirmation message.
  </ui:message>

This example shows messages in varying severity levels.

<aura:component access="global">
 <ui:message title="Confirmation" severity="confirm" closable="true">
   This is a confirmation message.
 </ui:message>
 <ui:message title="Information" severity="info" closable="true">
   This is a message.
 </ui:message>
 <ui:message title="Warning" severity="warning" closable="true">
   This is a warning.
 </ui:message>
 <ui:message title="Error" severity="error" closable="true">
   This is an error message.
 </ui:message>
 
</aura:component>

Attributes

Attribute Name Attribute Type Description Required?
body Component[] The body of the component. In markup, this is everything in the body of the tag.
class String A CSS style to be attached to the component. This style is added in addition to base styles output by the component.
closable Boolean Specifies whether to display an 'x' that will close the alert when clicked. Default value is 'false'.
severity String The severity of the message. Possible values: message (default), confirm, info, warning, error
title String The title text for the message.

Events

Event Name Event Type Description
dblclick COMPONENT The event fired when the user double-clicks the component.
mouseover COMPONENT The event fired when the user moves the mouse pointer over the component.
mouseout COMPONENT The event fired when the user moves the mouse pointer away from the component.
mouseup COMPONENT The event fired when the user releases the mouse button over the component.
mousemove COMPONENT The event fired when the user moves the mouse pointer over the component.
click COMPONENT The event fired when the user clicks on the component.
mousedown COMPONENT The event fired when the user clicks a mouse button over the component.