Canopy Forms Switch - REMOVED
The
lg-switchselector has been removed from Canopy's public API.
Existing switch usage should be migrated to supported components based on the interaction intent.
What to Remove
Remove switch imports/usages and selector-based switch templates:
<!-- Remove: -->
<lg-switch formControlName="notifications" value="enabled">
Enable notifications
</lg-switch>
<!-- Remove: -->
<lg-toggle variant="switch">Enable notifications</lg-toggle>
What to Replace It With
Choose the replacement based on behaviour:
- Immediate on/off choice where users compare options: use
lg-segmentor inline radios. - Selection that is reviewed and submitted later: use checkbox (
lg-checkbox/LgToggleComponent). - Single-choice form options from a defined set: use
LgRadioGroupComponent.
<!-- Example replacement with checkbox -->
<lg-checkbox formControlName="notifications" value="enabled">
Enable notifications
</lg-checkbox>
See also: forms-checkbox, forms-radio, forms-segment.
Don't
- Don't use
<lg-switch>in new templates. - Don't use
variant="switch"onLgToggleComponent. - Don't add switch-specific guidance to new design documentation.