(params: {
status?: enum,
duration?: number,
content?: string,
}): voidThe Message action is used to display a message to a user.
Parameters
object
status: enum: Message status type. Defaults tosuccess. One of:successerrorinfowarningloading.
duration: number: Time in seconds before message disappears. The default is 5.content: string: The content of the message.
Examples
Display a success message:
- id: success_message
type: Message
params:
content: SuccessDisplay an info message that remains visible for 10 seconds:
- id: info_message
type: Message
params:
content: Something happened
status: info
duration: 10Display an error message that never disappears:
- id: error_message
type: Message
params:
content: Something bad happened
status: error
duration: 0