Skip to main content

Send toast

In some cases we need to show a toast message to the user, telling them about what happened or what to do.

PropertyTypeDefault ValueOptionsDescription
typestringsuccessdanger, info or successWhat type of message to be displayed. Will affect the toast look.
titlestring(empty)N/ASets the title of the toast
textstring(empty)N/ADetailed description or message to be displayed to the user. Supports replaceables.
note

Toast are only displayed if user stays on same page and not navigated away.

Examples

Example 1: Show a success message

{
"type": "success",
"title": "Success!",
"text": "The task was successfully completed."
}

Example 2: Show an info message

{
"type": "info",
"title": "Info!",
"text": "The task was completed but with some warnings."
}

Example 3: Show an error message

{
"type": "danger",
"title": "Error!",
"text": "The task could not be completed. Please try again."
}