Skip to main content
Version: Next

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.
sizeenummdsm 32 / md 40 / lg 48 px. Use lg on HMI touch panels — md is below the 44px touch-target minimum. Options: sm · md · lg.
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.