import {InputTextarea} from 'primeng/primeng';
InputTextarea is applied to an input field with pInputTextarea directive.
<textarea pInputTextarea />
A model can be bound using ngModel regularly.
<textarea pInputTextarea [(ngModel)]="property"/>
In auto resize mode, textarea grows instead of displaying a scrollbar.
<textarea pInputTextarea autoResize="autoResize"/>
Name | Type | Default | Description |
---|---|---|---|
autoResize | boolean | false | When present, textarea size changes as being typed. |
disabled | boolean | false | When present, it specifies that the element should be disabled. |
Following is the list of structural style classes, for theming classes visit theming page.
Name | Element |
---|---|
ui-inputtextarea | Textarea element |
PrimeUI InputTextarea.
<h3 class="first">Default</h3>
<textarea rows="5" cols="30" pInputTextarea></textarea>
<h3>AutoResize</h3>
<textarea rows="5" cols="30" pInputTextarea autoResize="autoResize"></textarea>