URL-driven navigation tabs for settings, account, and app sub-navigation. Real links, aria-current, and prefix/exact matching.
Design intent
Tabs switch client-side panels; LinkTabs navigates between routes. Settings, account, and app sub-navigation are URL-driven, so they need link semantics, prefix/exact matching, and a router-agnostic link component rather than a tablist.
npx @slipstream-ui/cli@latest add link-tabsCurrent path: /docs/components/link-tabs
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items | LinkTabsItem[] | — | Tabs with label, href, exact, icon, disabled. |
| activeHref | string | — | Current pathname used to mark the active tab. |
| linkComponent | React.ElementType | — | Router link element; defaults to an anchor. |
| linkHrefProp | 'href' | 'to' | 'href' | Prop used to pass the destination to linkComponent (to for react-router style routers). |
| variant | 'default' | 'underline' | 'rounded' | 'default' | Strip design. |
| size | 'sm' | 'md' | 'lg' | 'md' | Control density. |
| label | string | 'Section' | Accessible name for the navigation landmark. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't use Tabs for route navigation
Tabs is a tablist for switching panels in place. Use LinkTabs when the URL changes; screen readers and browser history expect links.
tsx// Avoid<Tabs><TabsTrigger value="/settings">Settings</TabsTrigger></Tabs>// Prefer<LinkTabs items={[{ label: 'Settings', href: '/settings' }]} activeHref={pathname} />Don't hardcode the active state
Pass activeHref from the router; the component handles exact vs prefix matching.
Accessibility
- Renders a nav landmark with an accessible label.
- The active link receives aria-current="page".
- Disabled items render as spans with aria-disabled and no link.
Content guidelines
Tab labels
- Use 1-3 words
- Be parallel in structure
- Avoid vague labels
Good examples
- Overview
- Billing
- Members
Bad examples
- Click here
- More
- Misc
Composition
Compose with PageHeader: Place LinkTabs directly below the page header for section navigation.
Related components: Tabs, Breadcrumb, PageHeader, Link
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.