Segmented Control
- from @pluginui
One choice out of a few as a pill track of pressed-or-not buttons on Base UI's ToggleGroup and Toggle (roving arrow keys, aria-pressed). Selection never empties; pressing the pressed option reports onReselect. The pressed option has a fill and an edge at least 3:1 against the track. sm/md/lg heights (md 28px by default) through the control-height variables, per-option tooltips and names, and a wrapping layout.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @pluginui/core-segmented-controlLive preview
No live preview has been built for this component yet.
Registry dependencies0
The CLI adds no other registry items with this one.
Packages0
No npm packages are installed with it.