structyl

The full prop reference for the Tabs component. A set of layered sections of content — known as tab panels — displayed one at a time.

Import

tsx
import { Tabs } from '@structyl/styled';

Props

Tabs.Root

Root container for the tabs component. Manages controlled/uncontrolled tab state and provides context to child components.

PropTypeDefault
value#string

Controlled value of the active tab

defaultValue#string

Default value when uncontrolled

onValueChange#(value: string) => void

Callback fired when tab value changes

orientation#'horizontal' | 'vertical'

Layout direction of tabs

'horizontal'
dir#'ltr' | 'rtl'

Text direction; affects focus navigation

activationMode#'automatic' | 'manual'

Focus behavior: 'automatic' activates on focus, 'manual' requires Enter/Space

'automatic'
asChild#boolean

Render as child element (Radix Primitive pattern)

variant#'default' | 'underline' | 'pills' | 'enclosed'

Visual style variant (styled layer only)

'default'
color#'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success'

Active tab color theme; applies to underline and pills variants (styled layer only)

'primary'
className#string

CSS class name

Tabs.List

Container for tab triggers. Wraps TabsPrimitive.List with styling and layout controls.

PropTypeDefault
loop#boolean

Wrap focus navigation at list edges

true
scrollable#boolean

Enable horizontal scrolling with hidden scrollbar (styled layer only)

false
asChild#boolean

Render as child element (Radix Primitive pattern)

className#string

CSS class name (merges with variant styles)

Tabs.Trigger

Individual tab button. Manages selection, disabled state, and keyboard/mouse interactions.

PropTypeDefault
value#string

Unique identifier for this tab (required)

disabled#boolean

Disable tab selection and interactions

asChild#boolean

Render as child element (Radix Primitive pattern)

className#string

CSS class name (merges with variant styles)

Tabs.Content

Content panel for a tab. Only renders when tab is active (unless forceMount is true).

PropTypeDefault
value#string

Tab value this content belongs to (required)

forceMount#boolean

Always render content in DOM even when inactive

asChild#boolean

Render as child element (Radix Primitive pattern)

className#string

CSS class name (merges with animation styles)

Keyboard interactions

Adheres to the WAI-ARIA design pattern .

KeyDescription
TabMoves focus to the active trigger, then the panel.
ArrowLeft / ArrowRightMoves to the previous / next tab.
Home / EndMoves to the first / last tab.

Source code

If you didn't find what you need here, read the component implementation .

structyl — Accessible React Component Library