ToggleGroup
Independent single or multiple pressed-value selection with roving focus.
Independent single or multiple pressed-value selection with roving focus.
Web Components React Vue Vue 2
Loading interactive preview… The article and source are ready to read. Interactive controls will appear here when ready.
value/defaultValue are arrays. multiple=false keeps at most one value; clicking it again clears selection. Controlled valueChange requests never mutate the owner. Disabled, readOnly and duplicate-valued items do not commit. Arrow navigation changes focus without selecting.
Parts: Root, Item.
Draft source; native/GPUI, compiler, packed consumer, screenshots and full independent acceptance remain pending.
Toggle Group is workspace source. There is no public proto-ui add target. Passing value selects controlled mode.
| Prop | Type | Default |
|---|---|---|
defaultValue | readonly string[] | [] |
multiple | boolean | false |
disabled | boolean | false |
readOnly | boolean | false |
orientation | 'horizontal' 'vertical' | horizontal |
loop | boolean | true |
a11yLabel | string | '' |
These props belong to Root. Item defaults value to '' and disabled to false.