# Segmented Control

> Range switcher as a primitive: a hairline pill whose thumb glides between options on a shared-layout spring, with quiet labels and no chrome around it. The light theme darkens the track and raises a white thumb with a soft lift; the dark theme keeps a transparent track and a barely-there thumb. Options and the selected value are props (controlled or uncontrolled). Light and dark via shadcn theme tokens; respects reduced motion.

- Author: [Savva Sicevs](https://21st.dev/@ssicevs)
- Library: [ssicevs UI](https://21st.dev/@ssicevs/library/ssicevs)
- License: mit
- Tags: Control, Tabs, Toggle, Switcher
- npm dependencies: framer-motion
- Live preview: https://21st.dev/@ssicevs/components/segmented-control

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/ssicevs/segmented-control?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/control.md
