### File

`packages/components/eui-textarea/eui-textarea.component.ts`

### Description

A form control component that provides an enhanced textarea with additional features. Supports readonly state visualization, form control integration, and state management.

### Implements

`OnInit` `OnDestroy` `DoCheck` `OnChanges` `ControlValueAccessor`

### Metadata

encapsulation | `ViewEncapsulation.None`
HostDirectives | `BaseStatesDirective` Inputs : euiDisabled euiDanger
providers | `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EuiTextareaComponent), multi: true }`
selector | `textarea[euiTextArea]`
template |
    <ng-content />
styleUrl | `./eui-textarea.scss`

### Index

###### Properties
Static idCounter
###### Methods
Public onBlur Public onInputChange registerOnChange registerOnTouched setDisabledState writeValue
###### Inputs
disabled e2eAttr id isInvalid readonly
###### Outputs
rowsChange
###### HostBindings
class
###### HostListeners
blur input
###### Accessors
class disabled readonly

### Constructor

`constructor()`

### Inputs

disabled
Type : `boolean | null`
The disabled state of the textarea This can be controlled either directly or through form control binding.

e2eAttr
Type : `string`
Default value : `'eui-textarea'`

id
Type : `string`
Default value : ``eui-textarea_${EuiTextareaComponent.idCounter++}``
Unique identifier for the textarea

isInvalid
Type : `boolean`
Flag indicating if the textarea is in an invalid state This can be set manually or automatically through form validation.

readonly
Type : `any`
The readonly state of the textarea with special styling.

### Outputs

rowsChange
Type : `EventEmitter`
Event emitter that fires when the number of text rows in the textarea changes

### HostBindings

class
Type : `string`

### HostListeners

blur
Arguments : `'$event.target.value'`
`blur(value: string)`
Handles blur events on the textarea Parameters :
Name | Optional | Description
value | No | The current value of the textarea

input
Arguments : `'$event.target.value'`
`input(value: string)`
Handles input changes in the textarea Parameters :
Name | Optional | Description
value | No | The new value of the textarea

### Methods

Public onBlur
`onBlur(value: string)`
Decorators : `@HostListener('blur', ['$event.target.value'])`
Handles blur events on the textarea Parameters :
Name | Type | Optional | Description
value | `string` | No | The current value of the textarea
Returns : `void`

Public onInputChange
`onInputChange(value: string)`
Decorators : `@HostListener('input', ['$event.target.value'])`
Handles input changes in the textarea Parameters :
Name | Type | Optional | Description
value | `string` | No | The new value of the textarea
Returns : `void`

registerOnChange
`registerOnChange(fn: () => void)`
Registers the callback function for change events Parameters :
Name | Type | Optional | Description
fn | `function` | No | The callback function
Returns : `void`

registerOnTouched
`registerOnTouched(fn: () => void)`
Registers the callback function for touched events Parameters :
Name | Type | Optional | Description
fn | `function` | No | The callback function
Returns : `void`

setDisabledState
`setDisabledState(isDisabled: boolean)`
Sets the disabled state of the textarea Parameters :
Name | Type | Optional | Description
isDisabled | `boolean` | No | The disabled state to set
Returns : `void`

writeValue
`writeValue(obj)`
ControlValueAccessor implementation for writing values Parameters :
Name | Optional | Description
obj | No | The value to write to the textarea
Returns : `void`

### Properties

Static idCounter
Type : `number`
Default value : `0`
Static counter used to generate unique IDs for textarea instances

### Accessors

class
get `class()`

disabled
get `disabled()`
The disabled state of the textarea This can be controlled either directly or through form control binding. Returns : `boolean | null`
set `disabled(state: any)`
Parameters :
Name | Type | Optional
state | `any` | No
Returns : `void`

readonly
get `readonly()`
The readonly state of the textarea with special styling. Returns : `any`
set `readonly(state: any)`
Parameters :
Name | Type | Optional
state | `any` | No
Returns : `void`

# results matching ""

# No results matching ""