Skip to content

BannerMessage

The banner message is like a self-dismissing toast that is attached to the app's main navigation bar. It is more inclined towards alerting the user of error status.

All the properties defined under Action are applicable to this action.

BannerMessage Properties

Property Type Required Default
ActionLabel string No
Animated boolean No true
DismissBannerOnAction boolean No false
Duration integer No 2
Message string Yes
OnActionLabelPress ActionOrRule No
_Type const Yes

ActionLabel

Label to indicate that banner is clickable. On Android, it will be used as button label. On iOS, it will be appended to Message.

  • type: string

Animated

Indicates whether the banner is animated or not. This parameter is not applicable for Android. By default, banners on Android will always be animated.

  • type: boolean
  • default: true

DismissBannerOnAction

Indicates whether the banner should be dismissed or not after the user clicks on the banner to perform a subsequent action.

  • type: boolean
  • default: false

Duration

Indicates the number of seconds the banner is to be displayed. If the value is set to 0, the banner will be displayed indefinitely until the user taps on the ‘Dismiss’ button on Android or close icon on iOS.

  • type: integer
  • default: 2

Message

Text to be displayed in the banner. If the text is too long, it will be wrapped.

  • type: string

OnActionLabelPress

Action/Rule to be triggered when ActionLabel is pressed. This is applicable only when both ActionLabel and OnActionLabelPress are non-empty.


_Type

  • type: const

The value of this property must be:

"Action.Type.BannerMessage"

Action Result

This action has no ActionResult.


Examples

// BannerMessage.action
{
    "Message": "Message in a banner.",
    "Duration": 15,
    "Animated": true,
    "ActionLabel": "$(PLT,'Click to retry.','Retry')",
    "OnActionLabelPress": "/path/to/ConfirmMessage.action",
    "DismissBannerOnAction": true,
    "_Type": "Action.Type.BannerMessage"
}