Switch
Please refer to MUI's official docs for more details on component's usage guide and API documentation.
Manage checked
prop with the help of a state for controlled Switch
and use defaultChecked
prop for uncontrolled Switch
.
Use labelPlacement
prop with FormControlLabel
component to change the placement of the label.
Use color
prop with Switch
component for different colored switch.
Use styled
hook to customize your switch.
Use size='small'
prop with Switch
component for small switch.