Button
This page showcases various buttons you can implement in your app, each designed for specific actions. Below is a detailed explanation of the different button types, their configurations, and their intended actions.
Regular Buttons
The general structure of a button object is as follows:
{
"actions": [],
"buttonClasses": "btn btn-info",
"styleClasses": "col-md-2",
"text": "Push Me",
"type": "button"
}To assign actions to a button, you can populate the actions array. Below are examples of common button actions.
Open a Modal
{
"actions": [{
"action": "showModal",
"options": {
"body": "This is the modal body, actions are Kewl!",
"icon": "success",
"title": "<br>You triggered a modal!"
}
}],
"buttonClasses": "btn btn-info btn-lg",
"icon": "fa fa-comment",
"styleClasses": "col-md-2",
"text": "Show a Modal",
"type": "button"
}Redirect to a Path
Internal Link
External Link
Show Alert
JavaScript Function
The Print button action executes JavaScript functions:
runUtilityHook
This action allows you to run the onUtilityHook workflow when clicked. You can pass additional parameters in the options object:
Dropdown Buttons
Dropdown buttons contain multiple button objects within the subs array. Here’s an example:
Button Groups
Button groups use the group array to bundle related buttons together.
Dynamic Styling
This button uses buttonClasses_calc to dynamically generate CSS classes. It is a computed property that combines static classes with dynamic model data:
Button Triggering a namedActionn
This button uses the onclick_actions array to call a namedAction when clicked:
Last updated