TabNavigation
Provides shared context (variant, size, fullWidth) to its tab links for router-based navigation. Import from "@desk/ui/components/tab-navigation". Shares styling with the Tabs component.
Usage
import { TabNavigation, tabNavigationAnatomy, TabNavigationLink, TabNavigationList } from "@desk/ui/components/tab-navigation";Best practices
Use
TabNavigationwhen each tab is a route/URL (it renders a<nav>of links); for in-page panels that swap without navigating, useTabs.It shares the Tabs look via context but defaults to
variant="line"; mark the active link yourself (e.g. routeraria-current) — there's no Radix value tracking here.
Props
TabNavigation
| Prop | Type | Default | Description |
|---|---|---|---|
| fullWidth | boolean | false | Whether tabs should fill container width with equal widths |
| size | ResponsiveSize | "base" | Component size — a single token or a per-breakpoint object like
|
| variant | "line" | "pill" | "line" | Visual style variant: pill or line (underline) |
TabNavigationLink
| Prop | Type | Default | Description |
|---|---|---|---|
| active | boolean | false | Marks this tab as active — shows the animated indicator and sets |
| asChild | boolean | false | Render via Slot, merging props onto a custom link child (e.g. a router |
| href | string | ||
| icon | IconComponent | Optional icon rendered alongside the label. | |
| iconPlacement | "end" | "start" | "start" | Icon position relative to the label. |
| variant | "line" | "pill" | null | undefined | ||
| size | "base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | null | undefined |
TabNavigationList
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "line" | "pill" | null | undefined | ||
| size | "base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | null | undefined |
Also exports
- const
tabNavigationAnatomy
Anatomy
TabNavigation
tab-navigationRoot navigation container with tab-like styling
TabNavigationList
tab-navigation-listRow wrapping the individual tab links
TabNavigationLink
tab-navigation-linkSingle tab rendered as a routing link