Angular UI Components Documentation
The Angular TextArea is a multi-line text input with auto-complete and a styled scrollbar. This guide adds the Angular TextArea (jqxTextArea) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxtextarea 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxTextAreaModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxTextAreaModule } from 'jqwidgets-ng/jqxtextarea';
@Component({
selector: 'app-root',
imports: [jqxTextAreaModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Overview demo.
<jqxTextArea [width]="300" [height]="90" [source]="generateSource"
[minLength]="1" [placeHolder]="'Enter a sentence'">
</jqxTextArea>
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxTextAreaModule } from 'jqwidgets-ng/jqxtextarea';
@Component({
imports: [CommonModule, jqxTextAreaModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
generateSource(): string[] {
let quotes: string[] = [];
quotes.push(
'Life is a dream for the wise, a game for the fool, a comedy for the rich, a tragedy for the poor.'
);
quotes.push('Yesterday is not ours to recover, but tomorrow is ours to win or lose.');
quotes.push('It does not matter how slowly you go as long as you do not stop.');
quotes.push(
'Success depends upon previous preparation, and without such preparation there is sure to be failure.'
);
quotes.push('Better a diamond with a flaw than a pebble without.');
quotes.push('To succeed in life, you need two things: ignorance and confidence.');
quotes.push(
'A successful man is one who can lay a firm foundation with the bricks others have thrown at him.'
);
quotes.push('Sleep is the best meditation.');
return quotes;
}
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, change: This event is triggered when the value is changed.
<jqxTextArea (onChange)="onChange($event)"></jqxTextArea>
onChange(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, val: Sets or gets the value.
<jqxTextArea #myTextArea></jqxTextArea>
import { Component, viewChild } from '@angular/core';
import { jqxTextAreaModule, jqxTextAreaComponent } from 'jqwidgets-ng/jqxtextarea';
@Component({
selector: 'app-root',
imports: [jqxTextAreaModule],
templateUrl: './app.html'
})
export class App {
readonly myTextArea = viewChild.required<jqxTextAreaComponent>('myTextArea');
run(): void {
const value = this.myTextArea().val();
console.log(value);
}
}