A component used to encourage the user to perform an action whilst showing an attention-grabbing message.
upsell {
text = "Send to friends on Wise in seconds"
callToAction {
title = "Find friends"
behavior = LinkBehavior.build {
url = "https://wise.com"
}
}
onDismiss {
url = "/dismiss"
method = HttpMethod.POST
}
}When to use
- When the information/associated action is optional. For example, encouraging users to enable a new feature.
When not to use
- When the information/action is critical for the user to progress, consider using an Alert Layout instead.
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
callToAction | UpsellLayout.CallToAction | Yes | A titled call to action which can be performed by the user. |
control | String | No | Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored. |
margin | Size | No | The vertical margin to apply after this component. Defaults to md. |
media | Media | No | A media object (avatar, icon, image) which the client can use to represent this button. |
onDismiss | Request | No | The request sent when the upsell is dismissed. After the request is sent, clients do not collect the response. This request notifies the backend that the user has closed the upsell |
tags | Array<String> | No | An optional list of identifiers used to configure renderers. |
text | String | Yes | The main text of the upsell |
type | String | Yes | It must be upsell. |
The call to action configuration to be used by the Upsell Layout.
| Property | Type | Required | Description |
|---|---|---|---|
accessibilityDescription | String | No | A description of the call to action to be used by screen readers. |
behavior | Behavior | Yes | The Behavior that should be performed when user interacts with call to action. |
context | Context | No | The semantics of the call-to-action button. Defaults to neutral. |
title | String | Yes | A user-facing title. |