Skip to Content
Columbus

Tabs

A navigation component for switching between different views or content panels.

Your project at a glance.

Installation

pnpm dlx shadcn@latest add @columbus/tabs

Installing Tabs also installs Segmented Control, which it shares sizes and styles with.

Usage

import { Tabs, TabsList, TabsPanel, TabsTab } from "@/components/ui/tabs";

<Tabs defaultValue="account">
  <TabsList>
    <TabsTab value="account">Account</TabsTab>
    <TabsTab value="password">Password</TabsTab>
  </TabsList>
  <TabsPanel value="account">Account settings</TabsPanel>
  <TabsPanel value="password">Password settings</TabsPanel>
</Tabs>;

Use Tabs when each option shows its own panel. For a choice without panels, like a filter, use Segmented Control.

TabsTrigger and TabsContent are exported as aliases of TabsTab and TabsPanel.

Underline

Your project at a glance.

Vertical

Set orientation="vertical". The arrow keys follow the orientation.

Your project at a glance.

Sizes

API reference

Tabs wraps Base UI Tabs. Each part accepts the props of its Base UI counterpart.

PartBase UI part
TabsTabs.Root
TabsListTabs.List
TabsTabTabs.Tab
TabsPanelTabs.Panel

TabsList also takes:

Prop

Type

On this page