Search documentation

Search the documentation and open a page.

A set of layered sections of content that display one panel at a time.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/tabs

Composition

Tabs ├── TabsList │ ├── TabsTrigger │ │ ├── TabsTriggerDescription (optional) │ │ └── TabsTriggerCount (optional) │ └── TabsIndicator (optional) └── TabsContent

Examples

Default

Loading...

Disabled

Loading...

Full Width

Loading...

Line

Loading...

Metric Tabs

Loading...

Secondary

Loading...

Sizes

Loading...

Stacked

Loading...

Vertical

Loading...

With Counts

Loading...

With Icons

Loading...

API Reference

Tabs

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
idsElementIds | undefined—Overrides generated identifiers for individual parts.
translationsIntlTranslations | undefined—Configures translations.
loopFocusboolean | undefined—Configures loop focus.
valuestring | null | undefined—Current value when the component is controlled.
defaultValuestring | null | undefined—Initial value when the component is uncontrolled.
orientation"horizontal" | "vertical" | undefined"horizontal"Sets the component orientation and keyboard navigation axis.
activationMode"manual" | "automatic" | undefined—Configures activation mode.
onValueChange((details: ValueChangeDetails) => void) | undefined—Runs when value changes.
onFocusChange((details: FocusChangeDetails) => void) | undefined—Runs when focus changes.
compositeboolean | undefined—Configures composite.
deselectableboolean | undefined—Configures deselectable.
navigate((details: NavigateDetails) => void) | null | undefined—Configures navigate.
size"default" | "lg""default"-
variant"default" | "line" | "primary" | "secondary""default"-
align"center" | "start""start"-
layout"inline" | "stacked""inline"-

Context, Hooks, and Types

ExportAPI
TabsContextRender-prop component that exposes component state and actions.
TabsRootProviderProvides an externally created API to the component tree.
useTabsCreates or accesses the component API.
useTabsContextReturns the nearest component API.
TabsValueChangeDetailsType for the details object passed to the matching change callback.

Utilities and Supporting Types

ExportAPI
tabsTriggerVariantsStyle recipe used to reuse the component variants.
tabsListVariantsStyle recipe used to reuse the component variants.