4.2.0
Core

Tabs

Exactly one of several views of the same thing, always showing and never none — and it changes the view, never the URL.

Default

Tabs switch a view; they never navigate. Use links for anything routable.

Three deploys today, all green.

Usage

import {
  Tabs,
  TabsContent,
  TabsList,
  TabsTrigger,
} from '@oceanic-hub/brand-system'
<Tabs>
  <TabsList>
    <TabsTrigger value="…">…</TabsTrigger>
  </TabsList>
  <TabsContent value="…">…</TabsContent>
</Tabs>

Composition

Use the following composition to build a Tabs:

Tabs
├── TabsList
│   └── TabsTrigger ×4
└── TabsContent ×4

Tabs change a view; they do not navigate. If the panels should be linkable, bookmarkable or back-button-able, they are routes and the tab strip is a nav.

Accordion's own note ends: "it is not a tab strip — Tabs switch between views of one thing and exactly one is always showing." This is the other half of that sentence: an accordion reveals independent sections and may show none at once; a tab strip shows exactly one panel, always, and never zero. If a reader needs to compare two sections side by side, or see several at a glance, that is what an accordion (or no disclosure at all) is for — a tab strip has already decided that only one view matters at a time.

There is no variant. The active tab is a 1px accent underline, matching the nav bar, and that is the only selected-tab treatment this package ships. Upstream's newer generation added a default | line axis to TabsList; what we ship unconditionally already is line — a transparent trough with the underline. The default alternative needs its active trigger lifted off a filled trough, and core-layer.md's "Elevation is a border" refuses a lift outright — so re-admitting the axis would reopen a decision already made on doctrine grounds, not close a technical gap.

orientation="vertical" is supported, and it is a layout as well as a keyboard change. The strip becomes a rail beside the panel: the list's rule moves from under the triggers to down their right edge, the active mark rotates a quarter turn onto that edge, and Radix's roving focus switches the arrow keys from Left/Right to Up/Down. Nothing about the horizontal case moves — every vertical declaration sits behind Radix's own data-orientation, so a tab set that never asks for it renders exactly as before. It type-checked and rendered a broken horizontal strip until @OCE-1876; if you read that limitation somewhere, it is out of date.

RTL is not supported, and upstream ships an RTL example. Nothing in this package has been laid out or measured right-to-left, so the refusal is written down in pairings.json under direction rather than left to be discovered.

Disabled

disabled on a TabsTrigger fades it and makes it inert, the same passthrough Radix gives any button. Reach for it when a section should still be visible — a plan-gated view a reader ought to know exists; drop the trigger entirely when it should not be.

Three deploys today, all green.

With icons

A leading glyph beside the label reads at a glance — pair every trigger with one or leave them all bare, since a set with just one icon reads as a mistake, not an accent.

Three deploys today, all green.

Vertical

orientation="vertical" turns the strip into a rail beside the panel: the rule moves from under the triggers to down their right edge, and the accent mark rotates with it. Radix moves the arrow keys too — Up/Down walk the rail. Reach for it when the labels are long or there are more than about five, which is where a horizontal strip starts wrapping.

Name, description and the default branch.

Two levels — sections + campaign types

The Paid media reporting surface stacks two selectors: Tabs underline for sections, a pill-shaped ToggleGroup for campaign types underneath. They are two different controls on purpose — a pill tab would be a second selected-state vocabulary competing with Tabs's own underline (refused in tabs.contract.test-d.ts) — composed with no ad-hoc classes, driven by two independent pieces of controlled state a consumer can deep-link from query params.

API Reference

See the Tabs API page for every prop of every part, with types, defaults and the contract that pins them.

On this page