ComponentsNavigation
Tabs
Switch between content panels with default and line style variants. Built on Radix UI.
Default
Pill-style tabs with a background indicator.
Overview content here.
Line Variant
Underline-style tabs with a bottom border indicator.
Account settings.
Disabled Tab
Individual tabs can be disabled.
Active tab content.
Installation
npx visor add tabsThis copies two files into your project:
components/ui/tabs/tabs.tsx— the componentcomponents/ui/tabs/tabs.module.css— the styles
Usage
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs/tabs';
<Tabs defaultValue="overview">
<TabsList variant="default">
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="settings">Settings</TabsTrigger>
</TabsList>
<TabsContent value="overview">Overview content.</TabsContent>
<TabsContent value="settings">Settings content.</TabsContent>
</Tabs>API Reference
TabsProps
No props data available for “tabs”.
Sub-components
| Component | Element | Purpose |
|---|---|---|
Tabs | <div> (Radix Root) | Root container. Requires defaultValue or controlled value. |
TabsList | <div> | Horizontal container for tab triggers. Accepts variant prop. |
TabsTrigger | <button> | Clickable tab button tied to content via matching value prop. |
TabsContent | <div> | Content panel that displays when its matching trigger is active. |
Accessibility
- Built on
@radix-ui/react-tabswith full WAI-ARIA tab semantics. TabsListhasrole="tablist"; triggers haverole="tab"witharia-selected.- Content panels have
role="tabpanel"linked to their trigger viaaria-labelledby. ArrowLeft/ArrowRightnavigate between triggers;EnterorSpaceactivates.- Disabled triggers receive
aria-disabled="true"and are skipped in keyboard navigation.
Stepper
A multi-step progress indicator with horizontal and vertical orientations. Auto-derives step status from activeStep with accessible ARIA roles — copy it into your project and own it completely.
Context Menu
A menu that appears on right-click or long-press. Built on Radix UI with support for nested submenus, checkboxes, radio items, shortcuts, and disabled states.