Knit UI
GitHub

Playground

Loading playground…

false
true
false
true
Playground
<Tabs
  variant="default"
  orientation="horizontal"
  inverted={false}
  keepMounted
  allowTabDeactivation={false}
  loop
  defaultValue="general"
  size="sm"
/>

Examples

Variants

All three visual variants side by side.

Loading example…

VariantsSourceStorybook

Sizes

Full token size scale.

Loading example…

SizesSourceStorybook

Shadows

The shadow elevation prop, inherited from Box, applied to the Tabs root.

Loading example…

ShadowsSourceStorybook

Themed

Accent theme comes from Tamagui's theme prop.

Loading example…

ThemedSourceStorybook

With Disabled Tab

A disabled tab cannot be activated and is visually dimmed.

Loading example…

With Disabled TabSourceStorybook

With Sections

Tabs with left/right icon sections for visual adornment.

Loading example…

With SectionsSourceStorybook

Vertical

Vertical orientation with the list on the left side (default placement).

Loading example…

VerticalSourceStorybook

Vertical Right

Vertical orientation with the tab list placed on the right side.

Loading example…

Vertical RightSourceStorybook

Inverted

Inverted layout — the tab list renders below the panel content.

Loading example…

InvertedSourceStorybook

Controlled

Controlled — the active tab is owned by the parent component.

Loading example…

ControlledSourceStorybook

Growing Tabs

grow makes tabs expand to fill the full width of the list.

Loading example…

Growing TabsSourceStorybook

Styles

Per-slot styles targets individual parts — here the tab, label and panel.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
activateTabWithKeyboardboolean | undefinedtrueWhen an arrow key focuses a tab, also activate it. `false` = manual activation (focus moves, selection follows on Enter/Space). Web-only.
allowTabDeactivationboolean | undefinedfalseAllow clicking an active tab to deselect it.
childrenReactNode`Tabs.List` + `Tabs.Panel` children.
defaultValuestring | null | undefinedgeneralUncontrolled initial value.
disabled systemboolean | undefined
idstring | undefinedBase id for a11y ids. Auto-generated if omitted.
invertedboolean | undefinedfalseRender the tab list after the panels.
keepMountedboolean | undefinedtrueKeep inactive panels mounted (hidden) in the DOM.
loopboolean | undefinedtrueWrap arrow-key roving focus at the ends.
onChange((value: string | null) => void) | undefinedCalled when the active tab changes.
orientationTabsOrientation | undefined
horizontal · vertical
'horizontal'Layout axis of the tab list.
placementTabsPlacement | undefined
left · right
'left'Side the list sits on when orientation is vertical.
radius systemstring | number | undefined
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
'md'Size of tab labels and spacing.
styles systemSlotStyles<TabsStyles> | undefinedUniform per-slot style passthrough — sugar over the composable parts. Slots: `list` / `tab` / `label` / `section` / `panel`. Distributed through context so it reaches every nested `Tabs.Tab`/`Tabs.Panel`. Explicit inline props on a composed part always win.
theme systemThemeName | null | undefinedApplies a theme to this element
valuestring | null | undefinedControlled active tab value.
variant systemTabsVariant | undefined
default · outline · pills
'default'Visual style of the tab indicator.

Style slots

Every part of Tabs can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
labelstyles={{ label: { … } }}
liststyles={{ list: { … } }}
panelstyles={{ panel: { … } }}
sectionstyles={{ section: { … } }}
tabstyles={{ tab: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 495 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.