About
An iOS-style segmented control where a sliding thumb animates between options to switch between a small set of views or filters.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Segmented Control to your project and fits it to your theme.
Code
How Segmented Control is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import SegmentedControl from "@/components/ui/segmented-control";
import { useState } from "react";
export default function FullWidthDemo() {
const [range, setRange] = useState("7 days");
return (
<div style={{ width: 360 }}>
<SegmentedControl
options={["Today", "7 days", "30 days", "All time"]}
value={range}
onChange={setRange}
/>
</div>
);
}








