New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI TextBox component for Angular. Use this component to create styled and feature-rich text input fields.

Definition

Package:@progress/kendo-angular-inputs

Selector:kendo-textbox

Export Name:Accessible in templates as #kendoTextBoxInstance="kendoTextBox"

Syntax:

html
<kendo-textbox placeholder="Enter text"></kendo-textbox>

Inputs

Shows a Clear button in the TextBox.

Default:

false

Sets a custom icon for the Clear button.

Sets a custom SVG icon for the Clear button.

disabled

boolean

Sets the disabled state of the TextBox. To disable the component in reactive forms, see Forms Support.

Default:

false

errorIcon

string

Sets a custom icon for invalid user input.

Sets a custom SVG icon for invalid user input.

Sets the background and border styles of the TextBox (see example). The default value is set by the Kendo theme.

inputAttributes

{ [key: string]: string }

Sets the HTML attributes of the inner focusable input element. You cannot change attributes that are essential for component functionality.

maxlength

number

Sets the maximum length of the TextBox value.

Sets the placeholder text displayed when the component is empty.

readonly

boolean

Sets the read-only state of the component.

Default:

false

Sets the border radius of the TextBox (see example). The default value is set by the Kendo theme.

Highlights the whole value when you click the TextBox.

Default:

false

Specifies when to show the Error icon (see example).

Default:

false

Specifies when to show the Success icon (see example).

Default:

false

Sets the padding of the TextBox internal input element (see example). The default value is set by the Kendo theme.

Sets a custom icon for valid user input.

Sets a custom SVG icon for valid user input.

tabindex

number

Specifies the tabindex of the TextBox.

Default:

0

title

string

Sets the title attribute of the input element of the TextBox.

Sets the type attribute of the input element of the TextBox.

Default:

'text'

value

string

Provides a value for the TextBox.

Fields

Gets a reference to the visible input element of the TextBox.

Events

Fires when the TextBox component is blurred.

Fires when the user focuses the TextBox component.

Fires when the input element is blurred.

Fires when the user focuses the input element.

Fires when the value changes—when the component is blurred or the value is cleared through the Clear button (see example). Does not fire when you change the value programmatically through ngModel or formControl.

Methods

Removes focus from the TextBox.

Focuses the TextBox.