Skip to content

Segmented Control

Equal segments in a recessed track, selected by a pane of glass that slides beneath the labels and refracts them as it passes.

Install

$ pnpm dlx shadcn@latest add https://vitrumui.vercel.app/r/segmented-control.json

Examples

Default

API

<SegmentedControl />

PropTypeDefaultDescription
options{ value, label, disabled? }[]—The segments, in order.
valuestring—Controlled selection.
defaultValuestringfirst optionUncontrolled initial selection.
onValueChange(value: string) => void—Selection callback.
size"sm" | "default""default"Track height.