Tabs
Equal-priority panels within one local page context, with horizontal and vertical orientation.
Purpose
Use Tabs for equal-priority panels within one local page context, such as settings sections or compact detail views.
Tabbed panels
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/tabsImport
import { Tabs, TabsList, TabsPanel, TabsTab } from "@/components/ui/tabs";
import { TabsContent, TabsTrigger } from "@/components/ui/tabs";Need the machine-readable source metadata? View registry JSON.
Usage
Use Tabs to switch between related panels in the same context. Keep panel content mounted according to the primitive contract.
import { Tabs, TabsList, TabsPanel, TabsTab } from "@/components/ui/tabs";
export function Example() {
return (
<Tabs defaultValue="overview">
<TabsList><TabsTab value="overview">Overview</TabsTab></TabsList>
<TabsPanel value="overview">Overview panel</TabsPanel>
</Tabs>
);
}Examples
Underline variant, vertical orientation, sizes, disabled tabs, icons and controlled selection are props and compositions of the same primitive.
Underline variant
Vertical orientation
Sizes
Disabled tab
With icons
Controlled tabs
Underline vertical
In vertical orientation the underline indicator becomes a side bar.
Size overrides
TabsList and a single TabsTab accept their own size, overriding the root.
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
Tabsaccepts controlled or uncontrolledvalue,onValueChange,orientationandsize="sm" | "default" | "lg" | "xl"through the Base UI root contract.TabsListacceptsvariant="default" | "underline"and can provide the size to its child tabs.- Each
TabsTabrequires a matchingvalueand can be disabled or sized locally; render the corresponding content inTabsPanel. TabsContentremains a compatibility alias forTabsPanel; new code should use the canonicalTabsPanelname.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- The active indicator uses the native Siteplane position and size transition. Panels do not receive a heavy entrance animation.
- The operating-system reduced-motion preference removes indicator interpolation. The forced
reducedMotionPresetshortens the shared base duration from 180ms to 80ms while preserving selection and focus.
Accessibility
- Preserve the tab, tablist and tabpanel relationship generated by Base UI.
- Keep orientation consistent with both layout and arrow-key navigation.
- Do not make a disabled tab the only path to required content.
Implementation Guidance
- Use Stepper for workflow steps and navigation links for global routing.
- Use canonical
TabsPanelin new code and keep value pairs unique. - Do not replace native indicator, focus or orientation behavior.