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.
useFormControlContext API
Import
import { useFormControlContext } from '@mui/base/FormControl';
// or
import { useFormControlContext } from '@mui/base';
Name | Type | Default | Description |
---|---|---|---|
disabled | boolean | If | |
error | boolean | If | |
filled | boolean | If | |
focused | boolean | If | |
onBlur | () => void | Callback fired when the form element has lost focus. | |
onChange | React.ChangeEventHandler<NativeFormControlElement> | Callback fired when the form element's value is modified. | |
onFocus | () => void | Callback fired when the form element receives focus. | |
required | boolean | If | |
value | unknown | The value of the form element. |