Tabs

Components/Navigation

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/tabs

Overview

Copy

Tabs enable users to navigate between different content sections on the same page, card, or a panel.

Do

  • Use it to organize multiple content sections within the same context.
  • Use it to enhance usability by grouping information or forms into smaller, easily digestible parts.
  • Use short and descriptive tab titles.

Don't

  • Don't use it to group unrelated content.
  • Don't use it to navigate to other pages. Use <Sidebar/>, <Breadcrumbs/> or links instead.
  • Don't use it to show the path users need to follow to complete a process. Use <Stepper/> instead.

Feature examples

Size

Control tabs size with size prop:

  • Use small in dense layouts, like narrow panels.
  • Use smallMedium in layouts that sit between dense and standard.
  • Use medium (default) in all other layouts, like below <Page.Header/>.
Copy

Min width

By default, tabs fill in the entire width of their parent container and have a minimum width of 628 px.

Set custom min width of tabs using the minWidth prop.

Copy

Type

Control how tabs are positioned with type prop:

  • By default, each tab grows with its title. Side paddings are inside tabs.
  • compact - each tab grows with its title. Side paddings are outside tabs.
  • compactSide - each tab grows with its title. Side paddings are outside tabs. The first and the last tab has no left and right paddings respectively.
  • uniformSide - each tab grows to the size defined in width prop. If tab content is longer than the width, it gets truncated by ellipsis. Side paddings are inside tabs.
  • uniformFull - all tabs grow equally to fill in the whole container. Side paddings are inside tabs.
Copy

Disabled tab

Set disabled on an item to make that tab non-interactive and render it in a muted state.

Copy

Alignment

Control text alignment inside tabs with alignment prop. It supports 3 options:

  • Use start (default) to align tab titles to to the left.
  • Use center to align them to the middle.
  • Use end to align them to the right.
Copy

Bottom divider

Control if the default bottom divider is shown with hasDivider prop.

Copy

Side content

Add any component to the end of tabs with sideContent prop.

For example, use it to store a filter or form actions like Save and Cancel.

Copy

Scroll

When Tabs do not have enough space to be fully shown, a horizontal scroll will be enabled.

Copy

Common use case examples

In a page

Use tabs to divide all page contents into shorter, digestible parts.

Divide content in a way that allows users completing their task under each tab independently.

Copy

In a panel

Let users switch between parts of content in the same context of a <SidePanel/>.

Select to show either panel divider or a default tabs' divider to separate panel header from its main content.

Copy

With scroll

If there are several tabs, that do not fit into a narrow layout, let users navigation between them with scroll.

Copy

Code

Copy

Props

NameTypeDefaultDescription
activeIdstring | number—A selected tab id.
alignment"center" | "end" | "start"—Control text alignment in tab item.
dataHookstring—Applied as data-hook HTML attribute that can be used in the tests.
hasDividerboolean—Specifies whether to display a divider at the bottom of the tabs when showDivider isn't set.
horizontalPaddingbooleantrueIf true, adds horizontal padding to the tabs container.
horizontalScrollPropsHorizontalScrollCommonProps—Allows to pass all common horizontal scroll props.
items (required)Item[]—An array of tabs.
minWidthstring | number—A minimum width of the container.
onClick(item: Item) => void—Click event handler.
scrollOnOverflowbooleanfalseWraps overflowing content within a scrollable container.
showDividerboolean—If true, places a divider on bottom.
sideContentReactNode—Can be either string or renderable node.
size"small" | "medium" | "smallMedium"—One of: medium, small, smallMedium.
type"compact" | "compactSide" | "uniformSide" | "uniformFull"—One of: '', compact, compactSide, uniformSide, uniformFull.
widthstring | number—A specific width of a tab (only for uniformSide type)

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getTitlesGets all titles text
clickTabAtClicks the tab at index
getActiveTabIndexGets active tab index
isDefaultTypeChecks whether tabs type is default
getItemsContainerTypeGets tabs container type
getDataHookGets the data-hook
getItemsWidthGets a set of tabs widths
hasDividerChecks whether tabs has a divider
sideContentGets the side content
getSideContent—
getItemsMaxWidthsGets tabs max widths
getItemsMinWidthsGets tabs min widths
isTabDisabledChecks whether the tab at index is disabled
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.332.0 (2026-10-05) — maintenance release, no component-specific changes
  • 1.331.0 (2026-10-01) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.323.0 (2026-09-10) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — feat: add disabled prop to Item — renders the tab in a visually muted state and prevents interaction while keeping it focusable. (#16744) — has visual changes
  • 1.295.0 (2026-07-03) — feat: add smallMedium size and refresh odeditor active/hover fills (#16466) — has visual changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.279.0 (2026-05-13) — feat: add label font-size/line-height medium tokens for odeditor (#16236)
  • 1.278.0 (2026-05-08) — fix: fix default tabText font size (#16255) — has visual changes
  • 1.277.0 (2026-05-07) — fix: fix device hover support affecting active tab styles (#16233)
  • 1.273.0 (2026-04-30) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.254.0 (2026-02-03) — maintenance release, no component-specific changes
  • 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
  • 1.232.0 (2025-11-28) — feat: added default horizontal padding on editor3 (#15560)
  • 1.229.0 (2025-11-18) — feat: add wds-border-width-varied and apply to divider (#15528)
  • 1.213.0 (2025-08-19) — maintenance release, no component-specific changes
  • 1.212.0 (2025-08-11) — maintenance release, no component-specific changes
  • 1.208.0 (2025-07-25) — breaking: editor3 tokenization (#15117)
  • 1.197.0 (2025-06-06) — maintenance release, no component-specific changes
  • 1.172.1 (2025-03-21) — maintenance release, no component-specific changes
  • 1.172.0 (2025-03-20) — feat: integrate horizontal scrolling (#14554)
  • 1.162.0 (2025-02-17) — feat: introduce affix nodes (prefix & suffix) (#14502)
  • 1.155.0 (2025-01-23) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.120.0 (2024-08-02) — maintenance release, no component-specific changes
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.106.0 (2024-05-24) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.93.0 (2024-02-08) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?