Widgets

actions (buttons)

3min

This widget allows you to add primary and/or secondary actions (buttons) to a widget. This is a quick way for users to perform actions without needing to access a through the widget first.

  • Any of the actions that are available in the Actions section can be configured on the widget.
  • This widget can be configured in a group widget, which allows you to group the actions with other widget types.
Action widget
Action widget


Configuration options

Core structure



onPress

Configure the action to be executed when the action button is pressed.

title

Display the text content for the title.

Other options



footer

Add text to the footer of the widget.

footerAlign

Align the footer text to left, right, center.

placeholders

Specify a placeholder text to display if there is no data, for example - title: No data to display.

primary

Configure a title and onPress properties for a primary action button.

secondary

Configure a title and onPress properties for a secondary action button.

Examples and code snippets 

Actions widget
Actions widget


Here is an example of the actions button on the widget level. When the primary button is pressed, an avatar is shown, and when the secondary button (white with blue text) is pressed, the color palette is shown.

Examples: See the complete example in GitHub.

actions-widget
grid-item