Zephora UI

Navigation

Tabs

WAI-ARIA tabs with automatic activation, roving focus, three visual variants and horizontal or vertical orientation.

Import

import { Tabs, TabList, Tab, TabPanel } from "@zephora/react";

Examples

Basic

Link tabs and panels through a shared `value`.

Manage your account details.

Variants

line (default), enclosed and pill.

Enclosed variant.
Pill variant.

Controlled

Drive the selected tab from the outside with `value` + `onValueChange`.

Inbox is empty.

Active: inbox

API

Tabs props

PropTypeDefaultDescription
valuestring—Controlled selected tab value.
defaultValuestring—Initially selected tab value (uncontrolled).
onValueChange(value: string) => void—Called with the newly selected value.
orientation"horizontal" | "vertical""horizontal"Tab list direction; also switches the arrow-key axis.
variant"line" | "enclosed" | "pill""line"Visual style.
unstyledbooleanfalseHeadless mode — inherited by all parts.

Tab props

PropTypeDefaultDescription
value *string—Value linking this tab to its TabPanel.
disabledboolean—Disables the trigger.
unstyledboolean—Overrides the inherited headless mode.

TabPanel props

PropTypeDefaultDescription
value *string—Value linking this panel to its Tab.
unstyledboolean—Overrides the inherited headless mode.

Keyboard

KeyAction
ArrowRight / ArrowLeftMove focus to the next/previous tab (horizontal); focusing selects it.
ArrowDown / ArrowUpMove focus between tabs when orientation is vertical.
Home / EndFocus the first / last enabled tab.
TabMoves focus from the tab list into the active panel.