Skip to content

Notification ui-notification Added In: v0.5.0

Known in Dashboard 1.0 as a "Toast", this widget displays text/HTML in a small window that will appear on the screen for a defined duration of time (timeout) and at a defined location on the screen (position).

If you want to have the notification show indefinitely, you can set timeout to 0. It will not be possible to close the notification manually unless you also set allowDismiss or allowConfirm to true.

Properties

PropDynamicDescription
UIUnlike most widgets, notifications are owned by a "UI", not Group. This allows for notifications to be displayed across all pages.
PositionThe position on the screen whethere the notification will appear.
ColorThe color that should be used for the notification border.
TimeoutNumber of seconds before the notification will automatically close.
Show Countdown BarWhether or not to show a reducing progress bar to indicate the time remaining before the notification will close.
Allow Manual DismissalShow a button for users to dismiss the notification. Otherwise, will only close after Timeout.
Allow Manual Dismissal - Button LabelIf "Allow Manual Dismissal" is enabled, this is the label for the button.
Allow Manual ConfirmationShow a button for users to confirm the notification. Otherwise, will only close after Timeout.
Allow Manual Confirmation - Button LabelIf "Allow Manual Confirmation" is enabled, this is the label for the button.
Accept RawWhether you're passing in raw HTML that should be processed client-side.
ClassAppends CSS classes to the widget

Dynamic Properties

Dynamic properties are those that can be overriden at runtime by sending a particular msg to the node.

Where appropriate, the underlying values set within Node-RED will be overriden by the values set in the received messages.

PropPayloadStructuresExample Values
Disabled Statemsg.enabledBoolean
Allow confirmationmsg.ui_update.allowConfirmBoolean
Allow dismissalmsg.ui_update.allowDismissBoolean
Colormsg.ui_update.colorString
Confirmation button textmsg.ui_update.confirmTextString
Dismissal button textmsg.ui_update.dismissTextString
Display time(out)msg.ui_update.displayTimeNumber
Positionmsg.ui_update.position
  • top right
  • top center
  • top left
  • bottom right
  • bottom center
  • bottom left
  • center center
Progress bar colormsg.ui_update.progressColorString
Accept raw htmlmsg.ui_update.rawBoolean
Showmsg.ui_update.showBoolean
Show countdown barmsg.ui_update.showCountdownBoolean

Example

Example of rendered NotificationExample of rendered Notification in a Dashboard with a progress bar showing how long left until it will automatically close.

This notification was created using a msg.payload of:

html
<h3>Generated Notification</h3><p>This is custom HTML injected into <b>Node-RED</b></p>