Skip to main content
Version: 1.0.8

Tab Container

A tabbed container where only the open tab is mounted — so an eight-tab screen costs about as much to open as a one-tab screen.

The Tab Container component as it renders with its default settings.The Tab Container component as it renders with its default settings.

Reach for it when you need:

  • Overview / trends / alarms / documents on one equipment screen

Component name: TabContainer · Category: Container

In the palette: Tabbed container — one tab per panel, only the open tab is mounted

Properties​

Any property can be bound to a tag, another component's property, or a query.

PropertyTypeDefaultDescription
variantenummodernmodern = underline (default) · classic = enclosed folder tabs · pill · segmented · card · minimal. classic/segmented fall back to modern when the strip is vertical. Options: modern · classic · pill · segmented · card · minimal.
tabPositionenumtopleft/right give a vertical rail — prefer it past ~7 tabs or with long labels. Options: top · bottom · left · right.
sizeenuminheritTab height, text and icon size (the menu-row step: xs 28 · sm 32 · md 36 · lg 44 · xl 52 px). Project default = the project's Control size (Project settings → Theme). Sizes the tabs only, not the views inside them. Use lg or xl on touch panels (44px minimum). Options: inherit · xs · sm · md · lg · xl. 1.0.8
alignenumstartstretch = equal-width tabs. Horizontal strips only. Options: start · center · end · stretch.
overflowenumscrollscroll = the strip scrolls; wrap = it wraps to a second row (changes the strip height, which shifts the panel — prefer a vertical rail). Options: scroll · wrap.
mountPolicyenumlazylazy = only the open tab is mounted (no subscriptions/scripts in closed tabs). keepAlive = mount on first open, then hide — use for a half-filled form or a zoomed chart. eager = mount everything up front. Options: lazy · keepAlive · eager.
defaultTabstring""Node id of the tab that opens first. Empty = the first tab.
activeTabstring""The open tab. Bindable — a tag can drive which tab is shown. Runtime-only: switching tabs never dirties the project.
iconPositionenumleadingOptions: leading · none.
showIndicatorbooleantrueThe active-tab indicator bar (modern variant).
railWidthnumber180Width of the vertical rail (tabPosition left/right).
gapnumber4—
paddingnumber0—
colorcolor""Inactive label. Empty = --muted-foreground.
activeColorcolor""Empty = --foreground.
activeBgColorcolor""—
inactiveBgColorcolor""—
hoverColorcolor""—
hoverBgColorcolor""—
indicatorColorcolor""Empty = --primary. Keep it low-chroma: saturated colour is reserved for alarm state.
stripBackgroundcolor""—
borderColorcolor""Empty = --border. Check it is visible in BOTH themes.
stylestyle{}Custom CSS properties

Events​

Attach event actions to these in the Event Manager.

EventLabelGroupPayload
clickClickMouseThe DOM event.
dblclickDouble clickMouseThe DOM event.
contextmenuRight clickMouseThe DOM event.
mouseenterMouse enterMouseThe DOM event.
mouseleaveMouse leaveMouseThe DOM event.
Right-click behaves differently in the Designer

contextmenu fires your configured actions at runtime only — in LiveView and in preview. On the Designer canvas the right-click is captured to open the Event Manager, so testing it there will not run your actions. Test right-click in preview.

Notes​

Tab size Changed in 1.0.8​

size sets the height, text and icon of the tabs on the same step as a menu row — xs 28 · sm 32 · md 36 · lg 44 · xl 52 px. Project default (inherit, the default) follows the project's Control size. It sizes the tab strip only, never the views inside the panels. Use lg or xl on a touch panel: 44 px is the touch-target minimum.

Tabs no longer squeeze to fit. When there are more than the strip can hold, the strip scrolls sideways with a thin scrollbar.

Tab strips change size after upgrading

Before 1.0.8 size was its own sm / md / lg (32 / 40 / 48 px), and md was written into every new Tab Container. A saved view is converted when it is opened: a stored md becomes Project default, since it almost always meant "never touched", while sm and lg are kept as the deliberate choices they were. The result is that most tab strips follow the project's Control size — sm, 32 px, unless you change it — and an lg strip is now 44 px rather than 48.