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';
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.

controlRequired

A control element. For instance, it can be a Radio, a Switch or a Checkbox.

Type:

element

checked

If true, the component appears selected.

Type:

bool

classes

Override or extend the styles applied to the component.

See CSS API below for more details.

Type:

object

componentsProps

The props used for each slot inside.

Type:

{ typography?: object }

Default:

{}

disabled

If true, the control is disabled.

Type:

bool

disableTypography

If true, the label is rendered as it is passed without an additional typography node.

Type:

bool

inputRef

Pass a ref to the input element.

Type:

ref

label

A text or an element to be used in an enclosing label element.

Type:

node

labelPlacement

The position of the label.

Type:

'bottom' | 'end' | 'start' | 'top'

Default:

'end'

onChange

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 accessing event.target.checked (boolean).

required

If true, the label will indicate that the input is required.

Type:

bool

slotProps

The props used for each slot inside.

Type:

{ typography?: object }

Default:

{}

sx

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

value

The value of the component.

Type:

any

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.


.MuiFormControlLabel-rootroot

Styles applied to the root element.


.MuiFormControlLabel-labelPlacementStartlabelPlacementStart

Styles applied to the root element if labelPlacement="start".


.MuiFormControlLabel-labelPlacementToplabelPlacementTop

Styles applied to the root element if labelPlacement="top".


.MuiFormControlLabel-labelPlacementBottomlabelPlacementBottom

Styles applied to the root element if labelPlacement="bottom".


.Mui-disableddisabledSTATE

State class applied to the root element if disabled={true}.


.MuiFormControlLabel-labellabel

Styles applied to the label's Typography component.


.Mui-errorerrorSTATE

State class applied to the root element if error={true}.


.Mui-requiredrequiredSTATE

State class applied to the root element if required={true}.


.MuiFormControlLabel-asteriskasterisk

Styles applied to the asterisk element.


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