Newer Version Available
force:showToast
A toast displays a message below the header at the top of a view. The message is specified by the message attribute.
This example displays a toast message Success! The record has been updated successfully..
1showToast : function(component, event, helper) {
2 var toastEvent = $A.get("e.force:showToast");
3 toastEvent.setParams({
4 "title": "Success!",
5 "message": "The record has been updated successfully."
6 });
7 toastEvent.fire();
8}| Attribute Name | Type | Description |
|---|---|---|
| title | String | Specifies the title in bold for the toast. |
| message | String | Specifies the message to display. |
| key | String | Specifies an icon type. |
| duration | Integer | Toast duration in milliseconds. Default is 3000ms. |