Skip to content

Tabs

Category: Navigation

<Tabs defaultSelectedKey="overview">
<TabList aria-label="Sections">
<Tab id="overview">Overview</Tab>
<Tab id="usage">Usage</Tab>
<Tab id="api">API</Tab>
</TabList>
<TabPanel id="overview">…</TabPanel>
<TabPanel id="usage">…</TabPanel>
<TabPanel id="api">…</TabPanel>
</Tabs>

Install: @helix-ui/core

import { Tabs, TabList, Tab, TabPanel } from '@helix-ui/core';

status: stable · since: 0.1.0

Tags: sections, switch, in-page

[ Tab ][ Tab ][ Tab* ]
──────────────────────
panel content
  • display — block
  • width — fill
  • height — content
  • intrinsicSize — tab strip + panel; panel sized by content
  • stackable — false
  • fullBleed — false

A horizontal tab strip with an underline indicator under the active tab, followed by the active panel below. Hover/focus tabs lighten with surface tint.

Name Type Default Description
variant 'underline' | 'pill' underline Visual style. pill reads as a SegmentedControl with panels.
orientation 'horizontal' | 'vertical' horizontal Layout.
selectedKey Key — Controlled selection.
defaultSelectedKey Key — Uncontrolled initial.
onSelectionChange (key: Key) => void — Change handler.
  • Tabs children — TabList + TabPanels
  • TabList children — Tab components
  • Tab children — label
  • TabPanel children — panel content; one per Tab id

color.bg.surface.default, color.bg.action.neutral.default, color.bg.action.brand.default, color.text.primary, color.text.secondary, color.text.action.brand, color.border.default, color.border.focus, radius.md, space.1, space.2, space.3, space.4, font.family.sans, font.size.sm, font.weight.medium, shadow.sm

Role: tablist

Keyboard

Key Action
ArrowLeft Previous tab (horizontal).
ArrowRight Next tab (horizontal).
Home First tab.
End Last tab.
Component Relation Note
SegmentedControl alternative SegmentedControl for compact view-mode pickers.
Tab child Each tab.
TabPanel child Each panel.

These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.

“three-tab interface for Overview/Activity/Settings”

<Tabs>
<TabList>
<Tab id="o">Overview</Tab>
<Tab id="a">Activity</Tab>
<Tab id="s">Settings</Tab>
</TabList>
<TabPanel id="o">…</TabPanel>
<TabPanel id="a">…</TabPanel>
<TabPanel id="s">…</TabPanel>
</Tabs>