FormControlLabel API
Demos
For examples and details on the usage of this React component, visit the component demo pages:
Import
import FormControlLabel from '@mui/material/FormControlLabel';
// or
import { FormControlLabel } from '@mui/material';Drop-in replacement of the Radio, Switch and Checkbox component.
Use this component if you want to display an extra label.
Props of the native component are also available.
A control element. For instance, it can be a Radio, a Switch or a Checkbox.
Type:element
Override or extend the styles applied to the component.
See CSS API below for more details.
Type:object
If true, the label is rendered as it is passed without an additional typography node.
Type:bool
Callback fired when the state is changed.
Type:func
function(event: React.SyntheticEvent) => voideventThe event source of the callback. You can pull out the new checked state by accessingevent.target.checked(boolean).
The system prop that allows defining system overrides as well as additional CSS styles.
See the `sx` page for more details.
Type:Array<func
| object
| bool>
| func
| object
ref is forwarded to the root element.Theme default props
You can use MuiFormControlLabel to change the default props of this component with the theme.
The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.
Styles applied to the root element if labelPlacement="start".
Rule name:labelPlacementStart
Styles applied to the root element if labelPlacement="top".
Rule name:labelPlacementTop
Styles applied to the root element if labelPlacement="bottom".
Rule name:labelPlacementBottom
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverridesproperty in a custom theme.