Message (Deprecated)

ui:message

Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning/platformShowToastEvent or lightning/toast module.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App

Deprecation Guidelines 

We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning/platformShowToastEvent or lightning/toast.

For more information, see Aura Components in the ui Namespace Are Deprecated.

Usage Overview (Deprecated) 

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. To apply Lightning Design System styling, we recommend that you use lightning:notificationsLibrary instead of ui:message.

This example shows a confirmation message that can be dismissed.

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

Attributes 

NameDescriptionTypeDefaultRequired
bodyThe body of the component. In markup, this is everything in the body of the tag.Aura.Component[]
classA CSS style to be attached to the component. This style is added in addition to base styles output by the component.String
closableSpecifies whether to display an 'x' that will close the alert when clicked. Default value is 'false'.Booleanfalse
severityThe severity of the message. Possible values: message (default), confirm, info, warning, errorStringmessage
titleThe title text for the message.String