Tabs
Tabs
type: "tabs"
A set of tabs. Its children must be tab elements.
| Property | Type | Restrictions | Description |
|---|---|---|---|
| type | string | Required | Always tabs. |
| children | tab[] | - | The tabs. |
| visibleIf | Condition | - | Only shows the tabs while the condition passes. |
| hideIf | Condition | - | Hides the tabs while the condition passes. |
Tab
type: "tab"
A single tab. Can only be used as a child of tabs.
| Property | Type | Restrictions | Description |
|---|---|---|---|
| type | string | Required | Always tab. |
| label | string | Required | The label of the tab. |
| children | layout | - | The field names and layout elements within the tab. |
| visibleIf | Condition | - | Only shows the tab while the condition passes. |
| hideIf | Condition | - | Hides the tab while the condition passes. |
A hidden tab is removed from its tabs. If the selected tab gets hidden, the first visible tab is selected. If all tabs are hidden, the tabs aren't shown at all.
Example
mobro-widget-config.json
{
"layout": [
"metric",
{
"type": "tabs",
"children": [
{
"type": "tab",
"label": "Label",
"children": [
"label",
"font"
]
},
{
"type": "tab",
"label": "Value",
"children": [
"precision",
{
"type": "fieldset",
"label": "Colors",
"children": [
"value_color"
]
}
]
}
]
}
]
}