Input
The Input component provides users with a field to enter and edit text.
useInput API
Import
import { useInput } from '@mui/base/useInput';
// or
import { useInput } from '@mui/base';If true, the component is disabled. The prop defaults to the value (false) inherited from the parent FormControl component.
Type:boolean
If true, the input will indicate an error by setting the aria-invalid attribute. The prop defaults to the value (false) inherited from the parent FormControl component.
Type:boolean
If true, the input element is required. The prop defaults to the value (false) inherited from the parent FormControl component.
Type:boolean
Return value from the useFormControlContext hook.
Type:FormControlState | undefined
Resolver for the input slot's props.
Type:<ExternalProps extends Record<string, any> = {}>(externalProps?: ExternalProps) => UseInputInputSlotProps<ExternalProps>
Resolver for the root slot's props.
Type:<ExternalProps extends Record<string, any> = {}>(externalProps?: ExternalProps) => UseInputRootSlotProps<ExternalProps>