Controls
Control segmented
2–4 short choices in a panel row · a radio group, arrows move
function ControlSegmentedDemo() { const [align, setAlign] = React.useState('center'); return <ControlSegmented className={narrow} label="Align" value={align} onChange={setAlign} options={[{ value: 'start', label: 'Start' }, { value: 'center', label: 'Center' }, { value: 'end', label: 'End' }]} />;}Usage
The panel-sized SegmentedControl. More than four choices, or long labels: ControlSelect.
API
<ControlSegmented label value options={[{value,label}]} onChange />Get it
Already in every copy of the web kit:
import { ControlSegmented } from '@/components/controls/segmented';Details
- Exports
ControlSegmented- Packages
- cn@^0.5.2
- Also searched as
- radio group, toggle group, choice
- Registry JSON
- /r/web/control-segmented.json
Agents: the whole registry is at /llms.txt.