Lowdefy
v3.23.3/Actions/Notification/

Notification

(params: {
  status?: enum,
  duration?: number,
  message?: string,
  description?: string,
  placement?: enum,
  bottom?: number,
  top?: number
}): void

The Notification action is used to display a notification message to a user.

Parameters

object
  • status: enum: Message status type. Defaults to success. One of:
    • success
    • error
    • info
    • warning
    • loading.
  • duration: number: Time in seconds before the notification disappears. When set to 0 or null, it will never be closed automatically. The default is 5.
  • message: string: The title of notification. Default is "Success".
  • description: sttring: The content of the notification.
  • placement: enum: Position of the notification. Default is bottomRight. Can be one of:
    • topLeft
    • topRight
    • bottomLeft
    • bottomRight
  • bottom: number: Distance from the bottom of the viewport, when placement is bottomRightor bottomLeft in pixels. The default is 24.
  • top: number: Distance from the bottom of the viewport, when placement is topRightor topLeft in pixels. The default is 24.

Examples

Display a success notification:
- id: success
  type: Notification
  params:
    message: Hello
Display an info notification with a description:
- id: info
  type: Notification
  params:
    message: Something happened
    status: info
    description: This is a longer description of the thing that happened, so that you know why it happened.
    duration: 10
    placement: topRight
Display an warning notification that does not disappear until closed:
- id: warning
  type: Notification
  params:
    message: Something bad might happen.
    status: warning
    description: This is a longer description of the thing that happened, so that you know why it happened.
    duration: 0
    placement: topRight