# textarea

```ts
import { TextareaModule } from '@anguless/angulux/textarea';
```

## Textarea

`[aglTextarea], [aglInputTextarea]` — directive

Inherits every input, output and slot of `BaseModelHolder` — see [basemodelholder.md](basemodelholder.md).

Textarea adds styling and autoResize functionality to standard textarea element.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `pTextareaPT` | `TextareaPassThrough` | `undefined` | Used to pass attributes to DOM elements inside the Textarea component. |
| `pTextareaUnstyled` | `boolean \| undefined` | `undefined` | Indicates whether the component should be rendered without styles. |
| `autoResize` | `boolean \| undefined` | _not documented_ | When present, textarea size changes as being typed. |
| `aglSize` | `'large' \| 'small'` | _not documented_ | Defines the size of the component. |
| `variant` | `'filled' \| 'outlined' \| undefined` | `undefined` | Specifies the input variant of the component. |
| `fluid` | `` | `undefined` | Spans 100% width of the container when enabled. |
| `invalid` | `` | `false` | When present, it specifies that the component should have invalid state style. Left unbound, an element bound through `formControlName`, `[formControl]` or `ngModel` shows the state of that control once it is touched or dirty. |
| `touched` | `boolean \| undefined` | `undefined` | Whether the user has visited the field. Once this or `dirty` is set, the invalid state style waits for interaction: it appears when the field is touched or dirty. Signal Forms' `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both unset and `invalid` alone decides. |
| `dirty` | `boolean \| undefined` | `undefined` | Whether the user has changed the value. See `touched`. |

| Output | Type | Description |
| --- | --- | --- |
| `onResize` | `EventEmitter<Event \| {}>` | Callback to invoke on textarea resize. |
