Example JSON for definition
- Last UpdatedOct 02, 2025
- 1 minute read
An example JSON structure for definition in Configuration fields of the Toolbar module.
Json Structure*
{
"hideIcon":"YOUR-HIDE-ICON-HERE",
"showIcon":"YOUR-SHOW-ICON-HERE",
"submenuBackIcon":"YOUR-BACK-ICON-HERE",
"font":"YOUR-FONT-HERE,antialias,18",
"sections": [
{
"name": "YOUR-SECTION-NAME-HERE",
"collapseMode": "radio/icon/none", //radio, icon, none
"collapseIcon": "YOUR-COLLAPSE-ICON-HERE", //if collapseMode is "icon" or "radio"
"collapseRadioGroup": "YOUR-RADIO-GROUP-NAME-HERE", //if collapseMode is "radio"
"elements": [
{
"name": "YOUR_ELEMENT-NAME-HERE",
"type": "Button",
"enabled":"true", //true/false
"mode": "push/toggle/radio/multiState", //push, toggle, radio, multiState
"radioGroup": "YOUR-RADIO-GROUP-NAME-HERE", //if mode is "radio"
"allowDeselect": "true", //if mode is "radio", allows deselection
"states": //if mode is "multiState"
[
"state1",
"state2",
"state3"
],
//if mode is "multiState", defines the arguments for each state
"stateArguments": //if mode is "multiState", arguments for each state
[
"arg1",
"arg2",
"arg3"
],
"font": "YOUR-FONT-HERE,antialias,18", //font for the button
"text": "YOUR-BUTTON-TEXT-HERE", //text or icon for the button
"toolTipText": "", //tooltip text for the button
"callback": "YOUR_CALLBACK_FUNCTION_HERE", //function to call when button is clicked
"subMenu": "SideMenu/Labels", //if you want to add a submenu
"SideMenuSections": [ //if you want to add sections in the submenu
{
"sections": [
{
"name": "YOUR_SUBMENU_SECTION_NAME_HERE",
"elements":
[
{
}
]
}
]
}
]
}
]
}
]
}