display_action_screen
  • 1 Minute to read

display_action_screen


Article summary

display_action_screen()

This function displays a call-to-action screen.
Call-to-action (CTA) component is used in your app to guide users towards your goal conversion. It’s the perfect component when the user needs to click in order to take the action you want them to take. Some of the most popular usages for this component are ‘Welcome screen’ and ‘Confirmation screen’.

Reference

Screen Shot 2022-07-07 at 11.06.04 AM.png

Explore more about this component here

Arguments

ArgumentsTypeDefault Value
typeenumMODAL_TYPE.INFOenum to define the type of the modal (info/success/error)
titlestringtitle of the screen (mandatory)
subtitlestringsubtitle of the screen (optional)
button_textstringtext of CTA button(mandatory)
themeenumTHEME_TYPE.DARKenum to define the theme of the screen. Can be DARK or WHITE

Return

Dictionary that contains the action performed by the user.
The action will be: 'button clicked'.

Example

response = await self.UI.display_action_screen(title="Hey there!", subtitle="Good morning", button_text="Let's start", theme=THEME_TYPE.DARK)

self.log.info.print(response)
>>>[{"action": "button clicked"}]

Was this article helpful?

What's Next