Tabs
The tabs component organizes content into separate views, allowing merchants to switch between related information without leaving the current page. Use tabs when you need to present multiple categories of content in a space-efficient manner.
Tabs consist of a tab list containing clickable tab buttons and corresponding tab panels that display the content. Only one panel is visible at a time, reducing cognitive load and keeping the interface clean.
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
draft-order-details. action. render - pos.
exchange. post. action. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
product-details. action. render - pos.
purchase. post. action. render - pos.
register-details. action. render - pos.
return. post. action. render
Supported targets
- pos.
cart. line-item-details. action. render - pos.
customer-details. action. render - pos.
draft-order-details. action. render - pos.
exchange. post. action. render - pos.
home. modal. render - pos.
order-details. action. render - pos.
product-details. action. render - pos.
purchase. post. action. render - pos.
register-details. action. render - pos.
return. post. action. render
Anchor to Tabs PropertiesTabs Properties
Configure the following properties on the tabs component.
- Anchor to defaultValuedefaultValuedefaultValuestringstring
The default value of the selected tab.
This should match the
idprop of one of the tab panel components. If not provided, the first tab will be selected by default.Reflects to the
valueattribute- Anchor to disableddisableddisabledbooleanboolean
Disables all tabs and prevents user interaction.
- Anchor to valuevaluevaluestringstring
The value of the selected tab.
This should match the
idprop of one of the tab panel components. If not provided, the first tab will be selected by default.
Anchor to Tabs EventsTabs Events
The tabs component provides event callbacks for handling user interactions. Learn more about handling events.
- Anchor to changechangechange(event: CallbackEvent<"s-tabs">) => void(event: CallbackEvent<"s-tabs">) => void
CallbackEvent
- bubbles
boolean - cancelable
boolean - composed
boolean - currentTarget
HTMLElementTagNameMap[T] - detail
any - eventPhase
number - target
HTMLElementTagNameMap[T] | null
Anchor to TabListTab List
The tab list component contains the tab buttons. It must be a direct child of the tabs component.
- Anchor to childrenchildrenchildrenComponentChildrenComponentChildren
Accepts only tabs components.
ComponentChildren
TODO: Update `any` type here after this is resolved https://github.com/Shopify/ui-api-design/issues/139
anyThe tab component represents an individual tab button. It must be placed within a tab list and should use the controls property to associate it with a corresponding tab panel.
- Anchor to controlscontrolscontrolsstringstring
Corresponds to the
idproperty of the tab panel component that will be displayed when selected- Anchor to disableddisableddisabledbooleanbooleanDefault: falseDefault: false
Disables the control, disallowing any interaction.
Anchor to TabPanelTab Panel
The tab panel component contains the content for each tab. It must have an id that matches the controls property of the corresponding tab.
- Anchor to idididstringstring
The id of the tab panel used for identification in the tabs component. Must match the
controlsprop of the corresponding tab component.
Anchor to ExamplesExamples
Anchor to Create a tabbed interfaceCreate a tabbed interface
Organize content into tabs using the tabs component with tab list, tab, and tab panel components. This example shows a basic tabbed interface with two tabs.Create a tabbed interface

Create a tabbed interface
Anchor to Handle tab change eventsHandle tab change events
Subscribe to the onChange event to respond when merchants select different tabs. This example shows how to handle tab changes and capture the selected tab value in real time, enabling dynamic behavior based on which tab is active.Preview
Handle tab change events
Anchor to AccessibilityAccessibility
- Provide accessibility labels: Use the
accessibilityLabelprop on the tabs component to describe the purpose of the tab group. - Ensure keyboard navigation: The component supports arrow key navigation between tabs and Enter/Space to activate tabs.
- Connect tabs and panels: Always use matching
controls(on tab) andid(on tab panel) properties to maintain proper semantic relationships.