Skip to content
CraftDocs
Home
Home
Changelog
What's New
Guide
Guide
Getting Started
Principles
Styling Components
Theme System
Foundations
All Tokens
Color
Elevation
Icons
Motion
Shape
Spacing
Typography
Libraries
Libraries
@xds/cli
@xds/core
Themes
Themes
Theme: daily
Default Theme
Theme: matcha
Neutral Theme
Components
Components
AppShell
AspectRatio
Avatar
Avatar
AvatarStatusDot
Badge
Banner
Breadcrumbs
BreadcrumbItem
Breadcrumbs
Button
Button
IconButton
ToggleButton
ToggleButtonGroup
Calendar
Card
Carousel
Chat
ChatComposer
ChatComposerDrawer
ChatComposerInput
ChatComposerTokenElement
ChatDictationButton
ChatLayout
ChatLayoutScrollButton
ChatMessage
ChatMessageBubble
ChatMessageList
ChatMessageMetadata
ChatSendButton
ChatSystemMessage
ChatTokenizedText
ChatToolCalls
Checkbox
CheckboxInput
CheckboxList
CheckboxListItem
ClickableCard
Code
CodeBlock
Collapsible
Collapsible
CollapsibleGroup
useXDSCollapsible
CommandPalette
CommandPalette
CommandPaletteEmpty
CommandPaletteFooter
CommandPaletteGroup
CommandPaletteInput
CommandPaletteItem
CommandPaletteList
DateInput
Dialog
AlertDialog
Dialog
DialogHeader
useXDSImperativeAlertDialog
useXDSImperativeDialog
Divider
DropdownMenu
DropdownMenu
DropdownMenuDivider
DropdownMenuItem
DropdownMenuItemData
DropdownMenuSection
EmptyState
Field
Field
FieldLabel
FieldStatus
Heading
HoverCard
Icon
Kbd
Layout
Center
FormLayout
Grid
GridSpan
HStack
Layout
LayoutContainer
LayoutContent
LayoutFooter
LayoutHeader
LayoutPanel
Section
StackItem
VStack
Link
List
List
ListItem
Markdown
MetadataList
MetadataList
MetadataListItem
MobileNav
MoreMenu
NavHeadingMenu
NavIcon
NumberInput
OverflowList
Pagination
Popover
PowerSearch
ProgressBar
Radio
RadioList
RadioListItem
Resizable
ResizeHandle
useXDSResizable
SegmentedControl
SegmentedControl
SegmentedControlItem
SelectableCard
Selector
MultiSelector
Selector
SelectorOption
SideNav
SideNav
SideNavCollapseButton
SideNavHeading
SideNavItem
SideNavSection
Skeleton
Slider
Spinner
StatusDot
Switch
Table
BaseTable
Table
TableCell
TableHeaderCell
TableRow
useXDSTableColumnSettings
useXDSTablePagination
useXDSTableSelection
useXDSTableSelectionState
useXDSTableSortable
Tabs
Tab
TabList
TabMenu
Text
TextArea
TextInput
Thumbnail
TimeInput
Timestamp
Toast
Toast
useXDSToast
Token
Tokenizer
Toolbar
Tooltip
TopNav
TopNav
TopNavHeading
TopNavItem
TopNavMegaMenu
TopNavMegaMenuFeaturedCard
TopNavMegaMenuItem
TopNavMenu
TreeList
Typeahead
BaseTypeahead
Typeahead
TypeaheadItem
useXDSHoverCard
useXDSPopover
useXDSTooltip
Utilities
Utilities
LinkProvider
MediaTheme
SyntaxTheme
Theme
useClickableContainer
useEntryAnimation
useFocusTrap
useGridFocus
useImageMode
useInputContainer
useListFocus
useMediaQuery
useOverflow
useScrollLock
useScrollOverflow
useXDSLayer
useXDSStreamingText
Terms of UsePrivacy Policy
Type to search
↑↓Navigate↵SelectEscClose
TabList@xds/core v0.0.13 · XDSTabList

Usage

TabList provides tab-style navigation for organizing content into categorized sections. Use it to let users switch between related views without leaving the page, with overflow items handled by a built-in "more" menu.
ts
import {XDSTabList} from '@xds/core/TabList'

Best practices

GuidancePractices
DoKeep tab labels short and descriptive so users can quickly scan available sections.
DoUse XDSTabMenu to group overflow items when horizontal space is limited rather than scrolling tabs off-screen.
DoWhen using hasDivider with action buttons alongside tabs, use a smaller button size (sm) so the actions don’t overpower the tab row.
Don'tUse tabs for sequential steps or workflows — use a stepper or wizard pattern instead.
Don'tPlace more than 6–8 visible tabs before the overflow menu — prioritize the most important categories.
Don'tConfuse TabList with XDSSegmentedControl or XDSToggleButton. TabList is for navigation between views. SegmentedControl and ToggleButton are input controls — SegmentedControl always has exactly one selected option, while ToggleButton can be toggled on or off.

Sub-components

TabList is a compound component with 3 sub-components.

XDSTab

Individual tab item that renders as a button or an anchor link, with selected-state styling and optional icons.
PropTypeDescription
valuerequired
stringUnique value for this tab, matched against XDSTabListContext.value.
labelrequired
stringVisible label text for this tab.
href
stringURL to navigate to; when provided, the tab renders as an anchor element.
as
XDSLinkComponentTypeCustom component to render instead of <a> for link tabs. Overrides the XDSLinkProvider default. Only applies when href is provided.
icon
ReactNodeIcon element shown when the tab is not selected.
selectedIcon
ReactNodeIcon element shown when the tab is selected; falls back to icon if not provided.
endContent
ReactNodeContent rendered after the label, such as a badge count or status dot.
xstyle
StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.

XDSTabList

Nav wrapper that provides XDSTabListContext (value, onChange, size) to XDSTab and XDSTabMenu children.
PropTypeDescription
valuerequired
stringThe currently selected tab value.
onChangerequired
(value: string) => voidCallback fired when a tab is selected.
childrenrequired
ReactNodeXDSTab and XDSTabMenu items to render inside the nav.
size
'sm' | 'md' | 'lg' (default: 'md')Size variant applied to all child tabs.
hasDivider
boolean (default: false)Whether to show a bottom border divider under the tab list.
xstyle
StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value — not an inline style object like style={{}}.

XDSTabMenu

Overflow menu trigger that opens a dropdown of additional tab options, showing the selected option's label as the trigger text.
PropTypeDescription
labelrequired
stringLabel for the trigger button (shown when no option is selected) and the dropdown heading divider.
optionsrequired
XDSTabMenuOption[]Array of menu options rendered in the dropdown.

Examples

Common configurations, variations, and states.
TabList — Fill Layout
Tabs that stretch to fill the available width with a bottom divider.
TabList — With Actions
Page header pattern with tabs on the left and action buttons pushed to the right. When hasDivider is true, pair with a smaller button size (sm) so actions don\u2019t overpower the tab row.
TabList \u2014 With Badge
Tabs with notification badge counts rendered via endContent. Uses error variant for urgent counts and neutral for informational ones.
TabList — With Icons
Tabs with leading icons alongside text labels.
TabList — With Overflow Menu
Tab list with a dropdown menu for additional items that do not fit inline.
TabList \u2014 With Status Dot
Tabs with status dot indicators rendered via endContent to show live environment health at a glance.