Segmented Control
iOS-style segmented control. The active pill slides between options with a slight spring.
Import
import { SegmentedControl } from "@igorao79/uivix";Examples
Controlled
Showing stats for: week
Sizes
Full width
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | SegmentedOption[] | - | { value, label } for each segment |
| value | string | - | Controlled value |
| defaultValue | string | first option | Initial value when uncontrolled |
| onChange | (value: string) => void | - | Called on change |
| size | "sm" | "md" | "lg" | "md" | Size |
| fullWidth | boolean | false | Stretch to the container width |
| className | string | - | Additional CSS classes |