Segmented Tabs
A segmented control on top of shadcn Tabs: a pill track with a thumb that springs to the active segment, with optional panels.
Interactive preview · desktop · dark
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
example.tsx
import { SegmentedTabs } from '@/components/component-kit/items/segmented-tabs';
export function Example() { return ( <SegmentedTabs aria-label="Billing period" defaultValue="monthly" tabs={[ { value: 'monthly', label: 'Monthly' }, { value: 'yearly', label: 'Yearly' }, ]} /> );}Props
| Prop | Type | Default | Description |
|---|---|---|---|
tabs | SegmentedTab[] | — | Segments with a value, label and optional icon, disabled flag or content panel. |
size | "sm" | "default" | "lg" | default | Track height: 32, 36 or 40px. |
fullWidth | boolean | false | Stretch the control and give every segment equal width. |