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 SegmentedControlDemo() {
const [view, setView] = useState("Inbox");
return (
<SegmentedControl
options={["Inbox", "Assigned", "Resolved"]}
value={view}
onChange={setView}
/>
);
}
















