Contact us

Applies to: Customer's Canvas On-Premises; Customer's Canvas Hub cloud; UI Framework 4.0 - 4.47

Skip to main content

Button

A widget that adds a button. You can run code when the user selects it.

Button widget.

General info​

  • type: button

Params​

  • classStyle: 'primary' | 'success' (a button style).
  • text: the button caption.
  • icon: ID of an SVG icon defined in the UI theme.
  • image: URL to the button image.
  • enabled: whether the button is clickable.
  • visible: whether the button is visible.
  • onClick: a single function or an array of functions (described as {{#function ...}}; see Dynamic Configs article for details).

Example​

{
"name": "button-fin",
"type": "button",
"params": {
"text": "Click me",
"classStyle": "primary",
"onClick": "{{#function console.log('Hello world');}}",
"enabled": true,
"visible": true
}
}
Was this page helpful?