Skip to content
angulux
@anguless/angulux/textarea

textarea

1 declarations3 demos
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. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.