Recessed rail with spring-gliding beveled active thumb and non-overlapping shadow hover pill.
"use client"; import { useState } from "react";import SegmentedTabs from "@/components/ui/segmented-tabs"; const options = [ { id: "design", label: "Design" }, { id: "code", label: "Code" }, { id: "motion", label: "Motion" },] as const; export function ModeTabs() { const [mode, setMode] = useState<"design" | "code" | "motion">("design"); return <SegmentedTabs options={options} value={mode} onChange={setMode} ariaLabel="Mode" />;}Add it with the ComposeUI CLI, or copy the source manually.
optionsreadonly { id: T; label: string }[]Ordered tabs rendered inside the recessed segmented well.
valueTIdentifier matching the currently selected tab.
onChange(value: T) => voidInvoked immediately when a tab is clicked.
ariaLabelstringAccessible role='tablist' description.
Updated December 2026