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
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
Signature:
function(event: React.SyntheticEvent) => void
event
The 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.
CSS
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"
.
Styles applied to the root element if labelPlacement="top"
.
Styles applied to the root element if labelPlacement="bottom"
.
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
styleOverrides
property in a custom theme.