journey.dialog
Last updated
Last updated
Version compatibility
journey.dialog
was introduced with version 4.80.0 of the JourneyApps Runtime.
Dialogs appear as blocking overlays that provides information or confirms destructive behavior. They often prompt users to make a decision.
These docs describe dialogs called from JavaScript/TypeScript. For more fully featured, dynamic dialogs, please refer to the dialog
UI component docs. These dialogs are specified from the view XML and can include nested components.
Display a dialog with a message and one button.
title
Heading displayed on the dialog
message
Main message displayed in the dialog
okButton
Dialog's OK button. This can either be a string or an object with text
and color
as fields.
Returns true
when clicked.
okButton: "Done"
or
okButton: { text: "Done", color: "positive" }
Example:
Display a dialog with a message prompting the user to accept or cancel.
title
Heading displayed on the dialog
message
Main message displayed in the dialog
okButton
Dialog's OK button. This can either be a string or an object with text
and color
as fields.
Returns true
when clicked.
okButton: "Confirm"
or
okButton: { text: "Confirm", color: "positive" }
cancelButton
Dialog's Cancel button. This can either be a string or an object with text
and color
as fields.
Returns false
when clicked.
cancelButton: "Cancel"
or
cancelButton: { text: "Cancel", color: "negative" }
Example:
Display a dialog with a message and a text-input
for simple data entry.
For more advanced composition dialogs, see the dialog component documentation.
title
Heading displayed on the dialog
message
Main message displayed in the dialog
saveButton
Dialog's Save button. This can either be a string or an object with text
and color
as fields.
Returns the entered value as a string
when clicked.
saveButton: "Save"
or
saveButton: { text: "Save", color: "positive" }
cancelButton
Dialog's Cancel button. This can either be a string or an object with text
and color
as fields.
Returns undefined
when clicked.
cancelButton: "Cancel"
or
cancelButton: { text: "Cancel", color: "negative" }
inputLabel
Label for the input component
inputType
email
number
paragraph
password
tel
text
text
inputValue
Current value set for the input component
Example:
Display a dialog with only a message and one button to indicate an error state.
title
Heading displayed on the dialog
message
Main message displayed in the dialog
okButton
Dialog's OK button. This can either be a string or an object with text
and color
as fields.
Returns true
when clicked.
okButton: "Close"
or
okButton: { text: "Close", color: "negative" }
Example:
Version compatibility
Styling options were introduced in version 4.89.17 of the JourneyApps Runtime.
The style of buttons within these dialogs can be customized as follows.
Example:
Type of input required from the user. Can be one of the following types (reference: ):