Widgets
Content widget components

onPress

3min

Use the onPress event to add an action directly on the widget. This is particularly helpful in scenarios where you do not want to open a

 to perform an action, for example, tapping on a widget opens a URL or a modal.

Configuration options

Core structure



onPress

Choose from the provided list of available actions, for example, use the open-url action to open a specific URL.

Examples and code snippets 

Widget with onPress

In this example, tapping on the widget opens the info-modal to display information regarding

.

Examples: See the full example in GitHub.

Widget with onPress
Widget with onPress

YAML




Updated 08 Aug 2024
Doc contributor
Did this page help you?