Form Control
The Form Control component is a utility that lets you associate a form input with auxiliary components, such as labels, error indicators, or helper text.
FormControl API
Import
import { FormControl } from '@mui/base/FormControl';
// or
import { FormControl } from '@mui/base';Props
Props of the native component are also available.
If true, the label, input and helper text should be displayed in a disabled state.
Type:
boolDefault:
falseThe props used for each slot inside the FormControl.
Type:
{ root?: func | object }Default:
{}The components used for each slot inside the FormControl. Either a string to use a HTML element or a component.
See Slots API below for more details.
Type:
{ root?: elementType }Default:
{}The
ref is forwarded to the root element.CSS
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.