The html content to display to the user.
Object of string/string key/value pairs.
The id of the trigger that created this message. The SDK will report back this to Braze with in-app message analytics events.
How the message is dismissed, via a timer or requiring interaction from the user.
See the TextAlignment
enum.
Length of time in milliseconds until auto-dismiss should occur. Only used when
dismissType is DismissType
.AUTO_DISMISS.
Whether to animate the showing of this message.
Whether to animate the hiding of this message.
Color of the background frame which blocks page interaction while the message is showing.
The ID to give the parent HTML element that this message is rendered into.
Custom CSS to apply to the page while this element is shown. All selectors should be scoped to the htmlId of this message to prevent restyling elements outside of the message when it is shown.
Structured data provided by the Braze backend.
Whether to animate the showing of this message.
Whether to animate the hiding of this message.
Custom CSS to apply to the page while this element is shown. All selectors should be scoped to the htmlId of this message to prevent restyling elements outside of the message when it is shown.
How the message is dismissed, via a timer or requiring interaction from the user.
See the DismissType
enum.
Length of time in milliseconds until auto-dismiss should occur. Only used when
dismissType is DismissType
.AUTO_DISMISS
Object of string/string key/value pairs.
Color of the background frame which blocks page interaction while the message is showing.
The ID to give the parent HTML element that this message is rendered into.
Whether this message is a ControlMessage.
The message to display to the user.
Structured data provided by the Braze backend.
The id of the trigger that created this message. The SDK will report back this to Braze with in-app message analytics events.
Centers the image in the available space and crops any overflowing edges.
Fits the image within the available space, causing blank space on the shorter axis (e.g. tall images will have bars of blank space on the left/right)
Call this method if you wish to programmatically remove the message from the DOM. This method will only work with the Braze UI.
Remove all event subscriptions from this message.
Remove an event subscription that you previously subscribed to.
The identifier of the subscription you wish to remove, returned by the method you initially used to create it.
Subscribe to receive click events. The subscriber callback will be called whenever this message is clicked by the user.
The callback function to receive click events. This function will be invoked with no arguments when this message records a click.
The identifier of the subscription created. This can be passed to removeSubscription
to cancel the subscription. Returns null if the subscriber passed is not a function.
Subscribe to receive dismissed events. The subscriber callback will be called whenever this message is closed by the user, or when it's dismissed automatically (depending on the dismissType).
The callback function to receive dismissed events. This function will be invoked with no arguments when this message records a dismissal.
The identifier of the subscription created. This can be passed to removeSubscription
to cancel the subscription. Returns null if the subscriber passed is not a function.
An html-content in-app message object which can be passed to
showInAppMessage
or handled manually. Subscribe to be notified when in-app messages are triggered viasubscribeToInAppMessage