A row of options with one raised thumb that slides to the choice. It is a real radio group: arrow keys move the choice.
Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.
| Prop | Type | Default | Description |
|---|---|---|---|
| options | SegmentedOption<T>[] | The choices to show, each with a value, label and optional disabled flag. | |
| value | T | Selected option value. Set it to control the component. | |
| defaultValue | T | Option selected at first when uncontrolled. Defaults to the first enabled option. | |
| onValueChange | (value: T) => void | Called with the new option value whenever the choice changes. | |
| size | "sm" | "md" | "lg" | "md" | Control height and text size: "sm", "md" or "lg". |
| fullWidth | boolean | Stretch to the full width and share it equally. | |
| aria-label | string | Required: names the group for screen readers. | |
| className | string | Extra classes added to the outer element. |