# Text input

Text input is an input field for a single line of text. Text input can validate the required field, minimum or maximum length, and regular expression patterns.

### Methods

<table><thead><tr><th width="402">Method</th><th>Description</th></tr></thead><tbody><tr><td><code>setValue(value: string)</code></td><td>sets value for the text input</td></tr><tr><td><code>setDisabled(disabled: boolean)</code></td><td>sets input's state (enabled/ disabled)</td></tr><tr><td><code>reset()</code></td><td>resets text input to the initial value</td></tr><tr><td><code>validate()</code></td><td>triggers input's validation</td></tr><tr><td><code>focus()</code></td><td>sets focus on the component</td></tr><tr><td><code>resetValidation()</code></td><td>clears validation errors</td></tr></tbody></table>

### Triggers

Triggers allow you to launch certain actions based on different events.

<table data-header-hidden><thead><tr><th width="386"></th><th></th></tr></thead><tbody><tr><td><strong>On Change</strong></td><td>Calls for an action when the state of the text input changes</td></tr><tr><td><strong>On Init</strong></td><td>Calls for an action on component initialization</td></tr><tr><td><strong>On Enter</strong></td><td>Calls for an action on Enter click</td></tr><tr><td><strong>On Focus</strong></td><td>Calls for an action on component's focus</td></tr><tr><td><strong>On Blur</strong></td><td>Calls for an action on component's blur</td></tr></tbody></table>
