Directive

wrAutosize

Auto-grow a <textarea> between minRows and maxRows based on its scroll height. Composes natively with [(ngModel)], [formControl], validators, and third-party input directives.

Import

import { WrAutosize } from 'ngwr/directives';
import { WrInput } from 'ngwr/input';

Usage

<textarea wrAutosize minRows="2" maxRows="8" [(ngModel)]="text"></textarea>

API

NameDescriptionTypeDefault
[wrAutosize]Auto-grow <textarea> based on scrollHeight; bounded by minRows / maxRows.directive on textarea