SegmentedControl
Examples
Loading examples…
API
From COMPONENTS.md.
Inline button group where exactly one option is active. Use for mutually exclusive view modes, filter toggles, or quick status selection.
import { SegmentedControl } from 'achery-ui'
<SegmentedControl
options={[{ value: 'week', label: 'Week' }, { value: 'month', label: 'Month' }]}
value={period}
onChange={setPeriod}
/>
| Prop | Type | Default | Notes |
|---|---|---|---|
options |
SegmentOption[] |
— | { value: string; label: ReactNode }[] |
value |
string |
— | required |
onChange |
(value: string) => void |
— | required |
size |
'sm' | 'md' | 'lg' |
'md' |
|
disabled |
boolean |
false |
|
className |
string |
— |
Also available as a native component via achery-ui/native.