← ProcessesMED·Kit · Mehmet Ergul Design Kit

Components

Tabs

Underline navigation — wide-tracked labels with a single moving rule.

Preview

components/navigation/Tabs.jsx

The moving rule scales in from the left with the signature curve — the same treatment as the Predictor's view switcher.

Usage

src/components/ui/Tabs.tsx
tsx
import { Tabs } from "@/components/ui/Tabs";

<Tabs
  items={[
    { id: "videos", label: "Videos", count: 12 },
    { id: "writing", label: "Writing", count: 3 },
    { id: "design", label: "Design", count: 7 },
  ]}
  value={active}
  onChange={setActive}
/>

API

props
PropTypeDefaultDescription
items{ id, label, count? }[]Tab definitions; count renders as a quiet tabular figure.
valuestringControlled active tab id.
defaultValuestringitems[0].idInitial tab when uncontrolled.
onChange(id: string) => voidFires on selection.

Tokens consumed

semantic only
--color-border--color-fg--color-fg-muted--color-fg-subtle--duration-medium--ease-out-expo