R 8R 12
4
896 × 54
ComposeUI
ComponentsChartsBlocksDocs

Let's have coffee?

R 16
Subham avatar
Want to work together? Just want to chat?
Subham avatar
Check out my portfolio: subham12r.dev
Subham avatar
Or grab 15 mins on my calendar:
Coffee chat
Portfoliosubham12r.dev
Mail
hello@subham12r.dev
Socials
X / Twitter·GitHub·LinkedIn
Explore
Components·Charts·Blocks·Docs

Designed and built by Subham

ComposeUIComposeUI
© 2026 ComposeUI·React + Tailwind v4

Segmented

Fill
Stroke
Color

Segmented

Controls

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" />;}

Install

Add it with the ComposeUI CLI, or copy the source manually.

$ bunx --bun compose-ui-cli add segmented-tabs

API Reference

Prop
Type
Default
options
readonly { id: T; label: string }[]

Ordered tabs rendered inside the recessed segmented well.

—
value
T

Identifier matching the currently selected tab.

—
onChange
(value: T) => void

Invoked immediately when a tab is clicked.

—
ariaLabel
string

Accessible role='tablist' description.

—

Related components

#
R 12
on
Switch
R 12
clicks: 0
Button
R 12
Type to search sources & files
Prompt Bar

Updated December 2026

R 12
Previous

Switch

R 12
Next

Input