Switch
A component that toggles between 2 states: on & off.
- Its size is locked down to 52dp x 32dp; this is done in the SDK and cannot be modified.
Thumb Customizations
You can customize the thumb by passing a composable to thumbContent.
This example uses an Icon as the thumb.
- The size of the thumb in its unchecked state will grow to fill its parent if it is larger than 0dp.
SwitchDefaults.IconSizedefaults to 16dp, but it can go up to a max of 24dp.
Color Customizations
Colors can be customized via SwitchDefaults.colors().