Skip to Content

Tabs

Tabs provides the Windows 98 tab strip pattern with roving focus and controlled or uncontrolled selection.

Props

ExportKey propsDescription
TabsdefaultValue, value, onValueChange, keepMountedRoot state provider.
TabListmenu propsHorizontal tab list.
Tabvalue, disabledSelectable tab label.
TabPanelvaluePanel matched to a tab value.

Examples

Settings tabs

General settings appear in this panel.

ARIA

Tabs follows the ARIA tabs pattern with tablist, tab, tabpanel, aria-controls, and roving arrow-key focus. Press Enter or Space to activate the focused tab.

Keyboard

ArrowLeft and ArrowRight move focus between enabled tabs. Home and End move focus to the first and last enabled tab. Enter and Space activate the focused tab.

SSR

Use defaultValue for uncontrolled tabs, or keep controlled value consistent between server and client.

Last updated on