Skip to content
angulux
@anguless/angulux/textarea

Textarea

1 declaration3 demostextarea.md
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.

InputTypeDefaultDescription
pTextareaPTTextareaPassThrough undefined Used to pass attributes to DOM elements inside the Textarea component.
pTextareaUnstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
autoResizeboolean | undefinednot documentedWhen present, textarea size changes as being typed.
aglSize'large' | 'small'not documentedDefines 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.
touchedboolean | 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.
dirtyboolean | undefined undefined Whether the user has changed the value. See `touched`.
OutputTypeDescription
onResizeEventEmitter<Event | {}>Callback to invoke on textarea resize.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | 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.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.