Button
The Button is a push button that performs an action when the operator clicks it. It is found in the Input - OpenBridge section of the Perspective Component Palette as Button.

The Button is one of the input components. Events, disabling, icons and the behavior in the Designer are shared by all of them and are described in Input Components — Common Features. This page covers what is specific to the Button.
A Button with default properties and label set to Button:

A Button dropped from the palette has no label. Set label first.
Action
Section titled “Action”The Button has no value. When the operator clicks it, it fires the
onActionPerformed event once. Configure the event with the action to perform,
for example a script that writes to a tag (see Example 1).
A disabled Button does not fire the event.
Label and Icons
Section titled “Label and Icons”label is the text on the button. An icon can be shown before the label
(hasLeadingIcon), after it (hasTrailingIcon), or both.
| Leading icon | Trailing icon | Both |
|---|---|---|
leadingIcon and trailingIcon are icon names: type the name of an
OpenBridge icon, for example openbridge/search. See
Icons.
Properties
Section titled “Properties”| Name | Description | Property Type |
|---|---|---|
| label | Text on the button. Empty by default. | value |
| hasLeadingIcon | Show an icon before the label. Default false. |
value |
| leadingIcon | Name of the leading icon. Default openbridge/placeholder. Only shown when hasLeadingIcon is true. |
value |
| hasTrailingIcon | Show an icon after the label. Default false. |
value |
| trailingIcon | Name of the trailing icon. Default openbridge/placeholder. Only shown when hasTrailingIcon is true. |
value |
Variant
Section titled “Variant”variant selects how prominent the button is:
| variant | Enabled | Disabled | |
|---|---|---|---|
normal (default) |
The standard button. | ![]() |
![]() |
raised |
A filled button, for the most important action in a view. | ![]() |
![]() |
flat |
No border or background, for less important actions. | ![]() |
![]() |
Properties
Section titled “Properties”| Name | Description | Property Type |
|---|---|---|
| variant | normal, raised or flat. Default normal. |
value |
The button is as wide as its label and icons need. Set fullWidth to true to
make it fill the width of the component instead. The blue frame in the images
is the component’s box:
fullWidth = false |
fullWidth = true |
|---|---|
![]() |
![]() |
Properties
Section titled “Properties”| Name | Description | Property Type |
|---|---|---|
| fullWidth | Make the button fill the width of the component. Default false. |
value |
Common Properties
Section titled “Common Properties”These work in the same way on every input component, and are described in Input Components — Common Features:
- Disabled —
disabled. - Appearance —
style.
Component Events
Section titled “Component Events”| Event | Description | Event Object |
|---|---|---|
| onActionPerformed | Fired when the operator clicks the button. | — |
See Events.
Examples
Section titled “Examples”Example 1 — Start Command
Section titled “Example 1 — Start Command”-
Drop a Button into the view and set
labeltoStartandvarianttoraised. -
Configure the
onActionPerformedevent with a script action:def runAction(self, event):system.tag.writeBlocking(['[default]Pump01/StartCommand'], [True]) -
Bind
disabledto an expression that istruewhen the pump cannot be started, for example{[default]Pump01/Running}.
Found an error or something unclear?
Tell us what is wrong, confusing or missing on this page.
Built on the OpenBridge Design System






