API reference for Angular Material input

import {MatInputModule} from '@angular/material/input';

Selector: input[matInput] textarea[matInput] select[matNativeControl] input[matNativeControl] textarea[matNativeControl]

Exported as: matInput
Properties
Name Description
@Input({ transform: booleanAttribute })

disabledInteractive: boolean

Whether the input should remain interactive when it is disabled.

@Input()

errorStateMatcher: ErrorStateMatcher

An object used to control when error messages are shown.

@Input()

readonly: boolean

Whether the element is readonly.

@Input()

type: string

Input type of the element.

errorState: boolean

Whether the input is in an error state.

ngControl: inject(NgControl, { optional: true, self: true })!

Methods
focus

Focuses the input.

Parameters

options?

FocusOptions

updateErrorState

Refreshes the error state of the input.

Object that can be used to configure the default options for the input.

Properties
Name Description

disabledInteractive: boolean

Whether disabled inputs should be interactive.

Injection token that can be used to provide the default options for the input.

const MAT_INPUT_CONFIG: InjectionToken;

This token is used to inject the object whose value should be set into MatInput. If none is provided, the native HTMLInputElement is used. Directives like MatDatepickerInput can provide themselves for this token, in order to make MatInput delegate the getting and setting of the value to them.

const MAT_INPUT_VALUE_ACCESSOR: InjectionToken<{ value: any; }>;