Skip to main content

Tabs

Tabs​

type: "tabs"

A set of tabs. Its children must be tab elements.

PropertyTypeRestrictionsDescription
typestringRequiredAlways tabs.
childrentab[]-The tabs.
visibleIfCondition-Only shows the tabs while the condition passes.
hideIfCondition-Hides the tabs while the condition passes.

Tab​

type: "tab"

A single tab. Can only be used as a child of tabs.

PropertyTypeRestrictionsDescription
typestringRequiredAlways tab.
labelstringRequiredThe label of the tab.
childrenlayout-The field names and layout elements within the tab.
visibleIfCondition-Only shows the tab while the condition passes.
hideIfCondition-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"
]
}
]
}
]
}
]
}