Skip to main content
Version: 1.0.4

Button

The primary way an operator does something. On its own a button does nothing — attach event actions to its click event.

The Button component as it renders with its default settings.The Button component as it renders with its default settings.

Reach for it when you need:

  • Start/stop commands
  • Navigating to a detail view
  • Running a Gateway script

Component name: Button · Category: Input

In the palette: Clickable button

Properties

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
labelstringClick Me
variantenumprimaryOptions: primary · secondary · outline · ghost.
iconOnlybooleanfalseHide the label and shrink the button to the icon (keeps the chosen variant color)
colorcolor""Button background color (overrides the variant; still overridable via the inline Style editor)
hoverobject{"background":"","color":"","fontSize":0}Hover overrides (each value is validated): background color, text color, and font size (px).
iconOptionsobject{"icon":"","size":16,"position":"left","color":"","gap":8}Icon: name, size, position, color, and gap to the label
disabledbooleanfalse
stylestyle{}Custom CSS properties

Events

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes

Confirm consequential actions. A button that starts equipment should ask first, and the tag it writes should carry a write level — hiding the button is usability, not a control.

See also