Skip to main content

Text Tabs

Rocket 2.0

The Text Tabs component shows short blocks of text under a row of tabs, one block per tab, such as an overview, notes and terms. To put other components inside tabs, use Tabs.

Properties​

Property
Description
Expected Value
TabsTabs to show, each with a value, a label and the content text. Each can add an icon, badge, disable, visible or loading.Array
Current tabValue of the tab that is open. It updates as the user switches tabs.Text. Default: overview
Default tabValue 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 for a step-by-step flow.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 content. Switch tabs with actions.On or off. Default: Off
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
Dynamic heightLets the component grow with its content in the running app instead of keeping a fixed height.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.

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.tabs1.setTab("")
Next tabOpens the next tab.components.tabs1.nextTab()
Previous tabOpens the previous tab.components.tabs1.previousTab()
Set tab disableDisables or enables the tab with the given Tab id until Tabs changes.components.tabs1.setTabDisable("", "{{true}}")
Set tab loadingShows or hides a loading spinner in the content of the tab with the given Tab id.components.tabs1.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.tabs1.setTabVisibility("", "{{true}}")
Set visibilityShows the component when true, hides it when false.components.tabs1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.tabs1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.tabs1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
tabsTabs to show, each with a value, a label and the content text. Each can add an icon, badge, disable, visible or loading.{{components.tabs1.tabs}}
valueValue of the tab that is open. It updates as the user switches tabs.{{components.tabs1.value}}
defaultTabValue of a tab to open. When this changes, the component switches to that tab.{{components.tabs1.defaultTab}}
variantLook of the tab bar. Pills highlights the open tab, Underline draws a line under it, and Steps shows numbered steps for a step-by-step flow.{{components.tabs1.variant}}
tabsAlignWhere the tabs sit in the bar. Stretch spreads them across the full width.{{components.tabs1.tabsAlign}}
orientationWhether the tabs run along the Top or down the Side. The Steps style always runs along the top.{{components.tabs1.orientation}}
hideTabsHides the tab bar and shows only the open tab's content. Switch tabs with actions.{{components.tabs1.hideTabs}}
linearStepsWith the Steps style, stops the user from jumping ahead by clicking a later step.{{components.tabs1.linearSteps}}
loadingIndicatorWhat shows while the component is loading: a spinner or a skeleton tab bar.{{components.tabs1.loadingIndicator}}
currentTabThe value of the open tab.{{components.tabs1.currentTab}}
currentTabTitleThe label of the open tab.{{components.tabs1.currentTabTitle}}
currentStepIndexThe position of the open tab among the visible tabs, starting at 0.{{components.tabs1.currentStepIndex}}
isFirstStepWhether the open tab is the first visible tab.{{components.tabs1.isFirstStep}}
isLastStepWhether the open tab is the last visible tab.{{components.tabs1.isLastStep}}
isVisibleWhether the component is visible.{{components.tabs1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.tabs1.isLoading}}
isDisabledWhether the component is disabled.{{components.tabs1.isDisabled}}

Styles​

Style
Default
Accent (underline, active step)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
Panel textTheme: Primary text
Border colorTheme: Default border
Radius—
Tab font size14
Border around tabsOn
Tab list (legacy)—
Active tab (legacy)—
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.