The <button> tag adds a button to your widget form. This element behavior is similar to React's

Available attributes:

AttributeTypeMandatoryDescription
buttonTypeStringN

Specify the button style for forms and lists. 

The disabled buttons appear in gray. 

  • unstyled – a white color button

  • primary – a blue color button
  • approve – a green color button
  • destructive – a red color button
  • secondary – a transparent background for the button

  • icon-mini – a small button that provides extra information when moving the pointer over it or clicking it. See the example below:

disabledBooleanNSpecify whether the button should be disabled. A disabled button cannot be clicked.


To set a button, follow the example below:

Button
<checkbox model="data.doesUserCanReject" event-change="window.s_widget_custom.canCheckboxHandler();"></checkbox>
 
<button buttonType="destructive" disabled={data.doesUserCanReject} event-click="window.s_widget_custom.reject();">
  {data.rejectBtnTitle}
</button>