TextBoxComponent
Represents the Kendo UI TextBox component for Angular. Use this component to create styled and feature-rich text input fields.
<kendo-textbox placeholder="Enter text"></kendo-textbox>
Selector
kendo-textbox
Export Name
Accessible in templates as #kendoTextBoxInstance="kendoTextBox"
Inputs
Name | Type | Default | Description |
---|---|---|---|
clearButton |
|
|
Shows a Clear button in the TextBox. |
clearButtonIcon |
|
Sets a custom icon for the Clear button. | |
clearButtonSvgIcon |
|
Sets a custom SVG icon for the Clear button. | |
disabled |
|
|
Sets the disabled state of the TextBox. To disable the component in reactive forms, see Forms Support. |
errorIcon |
|
Sets a custom icon for invalid user input. | |
errorSvgIcon |
|
Sets a custom SVG icon for invalid user input. | |
fillMode |
|
|
Sets the background and border styles of the TextBox (see example). |
inputAttributes |
|
Sets the HTML attributes of the inner focusable input element. You cannot change attributes that are essential for component functionality. | |
maxlength |
|
Sets the maximum length of the TextBox value. | |
placeholder |
|
Sets the placeholder text displayed when the component is empty. | |
readonly |
|
|
Sets the read-only state of the component. |
rounded |
|
|
Sets the border radius of the TextBox (see example). |
selectOnFocus |
|
|
Highlights the whole value when you click the TextBox. |
showErrorIcon |
|
|
Specifies when to show the Error icon (see example). |
showSuccessIcon |
|
|
Specifies when to show the Success icon (see example). |
size |
|
|
Sets the padding of the TextBox internal input element (see example). |
successIcon |
|
Sets a custom icon for valid user input. | |
successSvgIcon |
|
Sets a custom SVG icon for valid user input. | |
tabindex |
|
|
Specifies the |
title |
|
Sets the | |
type |
|
|
Sets the |
value |
|
Provides a value for the TextBox. |
Fields
Name | Type | Default | Description |
---|---|---|---|
input |
|
Gets a reference to the visible |
Events
Name | Type | Description |
---|---|---|
inputBlur |
|
Fires when the |
inputFocus |
|
Fires when the user focuses the |
blur |
|
Fires when the TextBox component is blurred. |
focus |
|
Fires when the user focuses the TextBox component. |
valueChange |
|
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 |
Methods
blur |
---|
Removes focus from the TextBox. |
focus |
---|
Focuses the TextBox. |