Binary input components (Checkbox, Radio, and ToggleSwitch) have a <label> element that could be swapped out for the Label component so that:
- All binary input components can now have a semantic description in addition to a label
- The ToggleSwitch component can have a hideLabel prop which would cause the label to be visually hidden (this does not apply to Checkbox and Radio since there are no supported use cases for hidden labels)
We should aim to implement this while still allowing for a simple <label> element within the CSS-only examples that do not take advantage of the description or hideLabel feature.
Acceptance criteria
- Label is implemented in the 3 binary input components
- Description slot is added to the 3 binary input components
- hideLabel prop is added to ToggleSwitch, which is passed to the Label component
- Docs for Vue and CSS-only implementations are updated to demonstrate these new features