Skip to content

Function: SwitchVectorControl()

SwitchVectorControl(props): Element

Switch vector: a group of toggle buttons honouring the selection rule.

Deliberately not a ToggleGroup, and the reason is a promise the group could not keep. type="single" is a Radix radio group: role="radiogroup" with role="radio" children, and the ARIA radio pattern is selection-follows-focus, so arrowing from Disconnect to Connect tells a screen reader the selection moved. It does not. Nothing goes on the wire until the member is pressed, which is the right behaviour for a control that connects hardware and the wrong thing to claim while doing it. A group of toggle buttons says what actually happens: each member is pressed or not, focus changes nothing, and pressing sends.

Parameters

props

The switch vector to render.

vector

SwitchVector

Returns

Element

The group element.