Checkbox
Please refer to MUI's official docs for more details on component's usage guide and API documentation.
Basic Checkboxes
Controlled and Uncontrolled
Manage checked
prop with the help of a state for controlled Checkbox
and defaultChecked
prop for uncontrolled Checkbox
.
Colors
Use color
prop for different colored checkbox.
Custom Icons
Use icon
and checkedIcon
props with Checkbox
component to change default checkbox icons.
Customized
Use styled
hook to customize your checkbox.
Label Placement
Use labelPlacement
prop with FormControlLabel
component to change the placement of the label.
Show Error
You can display error by managing error
prop with FormControl
component with the help of a state.
Be careful
You can display an error
Sizes
Use icon
and checkedIcon
props with Checkbox
component and use
fontSize='small'
prop with the former props for small checkbox.