notification
Last updated
Last updated
Version Compatibility
notification
was introduced in version 4.23.0 of the JourneyApps Container.
The notification
UI component displays a message in a top-level bar to the user. It automatically fades out after a few seconds. notification
needs to be triggered from JavaScript/TypeScript.
Type | Note | Color |
---|---|---|
| Positive | |
| Negative | |
| Info | |
| Generic type. Introduced in version 4.27 of the JourneyApps Container | Info (default) |
Version Compatibility
notification
supports options since version 4.27 of the JourneyApps Container.
Examples:
notification
supports an options
object as a second parameter with the following valid keys:
Key | Description | Example |
---|---|---|
| Background color of the notification. Can either be:
Defaults to: |
|
| The color the notification's text. Can either be:
Note that if
|
|
| The time (in milliseconds) before the notification disappears.
Note: For no timeout (i.e. the notification displays until the user taps it or clicks on it), set
|
|
| See section below |
notification
supports buttons in the notification bar.
A button is an object with the following structure:
To add buttons to the notification
, add one or an array of the above object to the buttons
property of the options
object.
2 buttons:
1 button: