Skip to content

FormControlLabel API

API reference docs for the React FormControlLabel component. Learn about the props, CSS, and other APIs of this exported module.

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';
You can learn about the difference by reading this guide on minimizing bundle size.

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.

NameTypeDefaultDescription
control*element
A control element. For instance, it can be a Radio, a Switch or a Checkbox.
checkedbool
If true, the component appears selected.
classesobject
Override or extend the styles applied to the component. See CSS API below for more details.
componentsProps{ typography?: object }{}
The props used for each slot inside.
disabledbool
If true, the control is disabled.
disableTypographybool
If true, the label is rendered as it is passed without an additional typography node.
inputRefref
Pass a ref to the input element.
labelnode
A text or an element to be used in an enclosing label element.
labelPlacement'bottom'
| 'end'
| 'start'
| 'top'
'end'
The position of the label.
onChangefunc
Callback fired when the state is changed.

Signature:
function(event: React.SyntheticEvent) => void
event: The event source of the callback. You can pull out the new checked state by accessing event.target.checked (boolean).
requiredbool
If true, the label will indicate that the input is required.
slotProps{ typography?: object }{}
The props used for each slot inside.
sxArray<func
| object
| bool>
| func
| object
The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
valueany
The value of the component.

The 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.

Rule nameGlobal classDescription
root.MuiFormControlLabel-rootStyles applied to the root element.
labelPlacementStart.MuiFormControlLabel-labelPlacementStartStyles applied to the root element if labelPlacement="start".
labelPlacementTop.MuiFormControlLabel-labelPlacementTopStyles applied to the root element if labelPlacement="top".
labelPlacementBottom.MuiFormControlLabel-labelPlacementBottomStyles applied to the root element if labelPlacement="bottom".
disabled
STATE
.Mui-disabledState class applied to the root element if disabled={true}.
label.MuiFormControlLabel-labelStyles applied to the label's Typography component.
error
STATE
.Mui-errorState class applied to the root element if error={true}.
required
STATE
.Mui-requiredState class applied to the root element if required={true}.
asterisk.MuiFormControlLabel-asteriskStyles applied to the asterisk element.

You can override the style of the component using one of these customization options: