Button
Last updated
Last updated
The Button
is a fundamental building block for almost every app created with Uify. It renders a clickable button that triggers a pre-configured action on click. There are various styling options to alter the look-and-feel of the button to its particular environment.
The Button
component offers the following configuration properties.
Property | Type | Default value | Behavior |
---|---|---|---|
Disable while running |
|
| When set to |
Disabled |
|
| Whether the button should be disabled. When disabled, the button is greyed out and does not trigger the associated on-click action when clicked. |
Show loading while running |
|
| When set to |
Text |
| "Submit" | The text displayed on the button. |
Tooltip |
| "" | Tooltip text to display on hover over the button. If empty, no tooltip is shown. |
The Button
has only a single event: "On click". The associated action is executed when the button is clicked by the user, assuming that it is visible and not disabled. The action is executed regardless of how much time has passed between mouse-down and mouse-up.
The Button
exposes the following API in the JavaScript runtime environment.
Property / Function | Type | Behavior |
---|---|---|
|
| Emulates the click on the button. This function is a noop if the button is disabled, however executes the action even if the button is not visible to the user. |
|
| Provides the current boolean value of the "Disabled" property. |
|
| Sets the value of the "Disabled" property to the provided boolean value. |
|
| Sets the value of the "Text" property to the provided string. |
|
| Provides the current string value of the "Text" property. |