@anguless/angulux/textarea
Textarea
import
import { TextareaModule } from '@anguless/angulux/textarea';Basic
Textarea is a directive on a native textarea, so rows and cols keep working.
<textarea aglTextarea [(ngModel)]="value" rows="5" cols="30" placeholder="Your message"></textarea>Auto resize
autoResize grows the field with its content instead of scrolling it.
<textarea aglTextarea [(ngModel)]="value" [autoResize]="true" rows="2" cols="30" placeholder="Grows as you type"></textarea>Invalid
The invalid property styles the field as failing validation.
<textarea aglTextarea [(ngModel)]="value" [invalid]="!value" rows="3" cols="30" placeholder="Required"></textarea>API
Generated from the committed corpus, which check:corpus holds to the built library.
Textarea
directive[aglTextarea], [aglInputTextarea]Textarea adds styling and autoResize functionality to standard textarea element.
| Input | Type | Default | Description |
|---|---|---|---|
| p | TextareaPassThrough | undefined | Used to pass attributes to DOM elements inside the Textarea component. |
| p | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| auto | boolean | undefined | not documented | When present, textarea size changes as being typed. |
| agl | '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 |
|---|---|---|
| on | EventEmitter<Event | {}> | Callback to invoke on textarea resize. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |