<cad-switch>
Switch
Turn a setting on or off immediately. Use Checkbox for choices submitted with a form.
Auto-save
Sizes
Medium
Large
When to use it
Use Switch for immediate settings, Checkbox for choices submitted together, and Radio for one choice from a group. Never use a switch to confirm an irreversible action.
Sizes
Sizes are sm, md, and lg. Checked is blue; unchecked is neutral. Prefer one size per interface.
Saving a change
Disable the switch while saving. Add a labeled Spinner beside it if feedback is needed; loading is not a Switch state.
API reference: <cad-switch>
Accessibility
Uses role="switch" with a visible label and Space-key activation. Supports native form validation and reset. The hit target stays at least 44 pixels high, including at the small size.