Choose one of a few views or modes with a sliding selection; two sizes.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { SegmentedControl } from "@/components/ui/notchset/segmented-control";
const ranges = [
{ value: "1W", label: "1W" },
{ value: "1M", label: "1M" },
{ value: "1Y", label: "1Y" },
];
export function RangeSwitch() {
const [range, setRange] = React.useState("1M");
return <SegmentedControl aria-label="Range" size="sm" options={ranges} value={range} onValueChange={setRange} />;
}options–
{ value, label }[]The segments.
value / onValueChange–
stringControlled.
size–
"default" | "sm"40px (104px segments) or 28px (60px).
segment–
numberA custom segment width.
fillfalse
booleanFill the container with equal segments that shrink with it.
SegmentedControldata-slot="segmented-control"
The control.
components/ui/notchset/segmented-control.tsx
pnpm dlx shadcn@latest add https://notchset.dev/r/segmented-control.jsonpnpm dlx shadcn@latest add https://notchset.dev/r/radix-nova/segmented-control.jsonFree, no account or key. Use the command for your project's primitives: a radix-*, new-york or default style in components.json is Radix, a base-* style is Base UI. With the @notchset registry added, @notchset/<name> picks for you.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.0.0 · 2026-10-02
First release