Skip to main content

Tabs

Rocket 2.0

The Tabs component is a container with a row of tabs, each with its own area to drop components into, so related content shares one space, such as a record's details, activity and files. With the Steps style it works as a wizard with Back, Next and Finish buttons.

Properties​

Property
Description
Expected Value
TabsTabs to show, each with an id and a label. Each can add an icon, badge, disable, visible or loading. Keep the ids the same, since components dropped into a tab stay with its id.Array
Current tabId of the tab that is open. It updates as the user switches tabs.Text. Default: details
Default tabId of a tab to open. When this changes, the component switches to that tab.Text
StyleLook of the tab bar. Pills highlights the open tab, Underline draws a line under it, and Steps shows numbered steps with wizard buttons.Pills, Underline, Steps. Default: Pills
Tab alignmentWhere the tabs sit in the bar. Stretch spreads them across the full width.Start, Center, Stretch. Default: Start
OrientationWhether the tabs run along the Top or down the Side. The Steps style always runs along the top.Top, Side. Default: Top
Hide tabsHides the tab bar and shows only the open tab's area. Switch tabs with actions.On or off. Default: Off
Render only active tabLoads only the open tab's components. When off, every tab's components stay loaded, keeping their values while hidden.On or off. Default: Off
Scroll to top on tab switchScrolls the newly opened tab back to its top.On or off. Default: Off
Wizard: Back and Next buttonsWith the Steps style, shows Back and Next buttons and a step count under the content.On or off. Default: On
Wizard: Next labelText on the wizard's button that moves to the next step.Text. Default: Next
Wizard: Back labelText on the wizard's button that moves to the previous step.Text. Default: Back
Wizard: Finish labelText on the wizard's button on the last step.Text. Default: Finish
Wizard: steps in order onlyWith the Steps style, stops the user from jumping ahead by clicking a later step.On or off. Default: On
Loading lookWhat shows while the component is loading: a spinner or a skeleton tab bar.Spinner, Skeleton. Default: Spinner

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On tab switchTriggers when the open tab changes.
On finishTriggers when the user clicks the wizard's finish button on the last step.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Set tabOpens the tab with the given Tab id. A hidden or disabled tab is ignored.components.tabscontainer1.setTab("")
Next tabOpens the next tab.components.tabscontainer1.nextTab()
Previous tabOpens the previous tab.components.tabscontainer1.previousTab()
Set tab disableDisables or enables the tab with the given Tab id until Tabs changes.components.tabscontainer1.setTabDisable("", "{{true}}")
Set tab loadingShows or hides a loading spinner in place of the content of the tab with the given Tab id.components.tabscontainer1.setTabLoading("", "{{true}}")
Set tab visibilityShows or hides the tab with the given Tab id until Tabs changes. Hiding the open tab moves to the next one.components.tabscontainer1.setTabVisibility("", "{{true}}")
Set visibilityShows the component when true, hides it when false.components.tabscontainer1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.tabscontainer1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.tabscontainer1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
tabsTabs to show, each with an id and a label. Each can add an icon, badge, disable, visible or loading. Keep the ids the same, since components dropped into a tab stay with its id.{{components.tabscontainer1.tabs}}
currentTabId of the tab that is open. It updates as the user switches tabs.{{components.tabscontainer1.currentTab}}
defaultTabId of a tab to open. When this changes, the component switches to that tab.{{components.tabscontainer1.defaultTab}}
variantLook of the tab bar. Pills highlights the open tab, Underline draws a line under it, and Steps shows numbered steps with wizard buttons.{{components.tabscontainer1.variant}}
tabsAlignWhere the tabs sit in the bar. Stretch spreads them across the full width.{{components.tabscontainer1.tabsAlign}}
orientationWhether the tabs run along the Top or down the Side. The Steps style always runs along the top.{{components.tabscontainer1.orientation}}
hideTabsHides the tab bar and shows only the open tab's area. Switch tabs with actions.{{components.tabscontainer1.hideTabs}}
renderOnlyActiveTabLoads only the open tab's components. When off, every tab's components stay loaded, keeping their values while hidden.{{components.tabscontainer1.renderOnlyActiveTab}}
scrollToTopOnTabSwitchScrolls the newly opened tab back to its top.{{components.tabscontainer1.scrollToTopOnTabSwitch}}
showStepNavWith the Steps style, shows Back and Next buttons and a step count under the content.{{components.tabscontainer1.showStepNav}}
nextLabelText on the wizard's button that moves to the next step.{{components.tabscontainer1.nextLabel}}
backLabelText on the wizard's button that moves to the previous step.{{components.tabscontainer1.backLabel}}
finishLabelText on the wizard's button on the last step.{{components.tabscontainer1.finishLabel}}
linearStepsWith the Steps style, stops the user from jumping ahead by clicking a later step.{{components.tabscontainer1.linearSteps}}
loadingIndicatorWhat shows while the component is loading: a spinner or a skeleton tab bar.{{components.tabscontainer1.loadingIndicator}}
currentTabTitleThe label of the open tab.{{components.tabscontainer1.currentTabTitle}}
currentStepIndexThe position of the open tab among the visible tabs, starting at 0.{{components.tabscontainer1.currentStepIndex}}
isFirstStepWhether the open tab is the first visible tab.{{components.tabscontainer1.isFirstStep}}
isLastStepWhether the open tab is the last visible tab.{{components.tabscontainer1.isLastStep}}
isVisibleWhether the component is visible.{{components.tabscontainer1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.tabscontainer1.isLoading}}
isDisabledWhether the component is disabled.{{components.tabscontainer1.isDisabled}}

Styles​

Style
Default
Accent (active step, focus ring)Theme: Brand primary
Tab bar backgroundTheme: Surface 3
Tab text colorTheme: Placeholder text
Active tab text colorTheme: Primary text
Active tab background (pills)Theme: Surface 1
Active tab indicator (underline)Theme: Brand primary
Panel backgroundTheme: Surface 1
Border colorTheme: Default border
BackgroundTheme: Surface 1
Radius—
Tab font size14
Border around tabsOn
Padding12
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.