import { Component } from '@angular/core';
import { WrAutosize } from 'ngwr/directives';
import { WrInput } from 'ngwr/input';
@Component({ imports: [WrAutosize, WrInput] })
export class MyComponent {}wrAutosize
Grow a <textarea> with its content, between minRows and maxRows.
Installation
Import the class, and @use the entry point in your global styles: without it the component renders unstyled.
Usage
<textarea wrAutosize minRows="2" maxRows="8" [(ngModel)]="text"></textarea>API
| Name | Description | Type | Default |
|---|---|---|---|
[wrAutosize] | Grows the <textarea> with its content. | directive on textarea | — |
minRows | Fewest rows. | number | 1 |
maxRows | Most rows. 0 means no limit. | number | 0 |