packages/react-components/react-switch/library/docs/MIGRATION.md
checkeddefaultCheckedas - Uses new pattern for as introduced in v9label - Now implemented as a v9 slotonChange - Has a slightly different API with our new event data handling patternariaLabel => Getting it as aria-label insteaddisabledroleascomponentRef => Use regular ref insteadinlineLabel => Use labelPosition insteadstyles => Use new styling system via tokens insteadoffTextonTextthemecheckeddefaultCheckedlabelPositionas - Uses new pattern for as introduced in v9indicator => Now implemented as a v9 slotlabel - Now implemented as a v9 slotonChange - Has a slightly different API with our new event data handling patternclassNamedisabledonClickaccessibility => Override accessibility behavior by composing the Switch however you wantstyles => Use new styling system via tokens insteadtoggle => Default behavior for Switch in v9variables => Use new styling system via tokens insteaddesignv8 Toggle | v0 Checkbox | v9 Switch |
|---|---|---|
accessibility | ||
arialabel | aria-label | aria-label |
as | as | as |
checked | checked | checked |
className | className | className |
componentRef | ref | |
defaultChecked | ||
design | ||
disabled | disabled | disabled |
indicator | indicator | |
inlineLabel | labelPosition | labelPosition |
label | label | label |
offText | ||
onChange | onChange | onChange |
onClick | onClick | onClick |
onText | ||
role | role | |
styles | styles | |
theme | ||
| Default behavior | toggle | Default behavior |
variables |