philippfrenzel/yii2-textareaautosize Yii2 textareaautosize Widgets



JQuery Fullcalendar Yii2 Extension JQuery from: Version 2.1.1 License MIT

JQuery Documentation: Yii2 Extension by

A tiny sample can be found here:

Latest Stable Version Build Status Code Climate Version Eye License


Package is although registered at - so you can just add one line of code, to let it run!

add the following line to your composer.json require section:


And ensure, that you have the follwing plugin installed global:

php composer.phar global require "fxp/composer-asset-plugin:~1.0"


29-11-2014 Updated to latest 2.2.3 Version of the library


Quickstart Looks like this:

  <?= net\frenzel\textareaautosize\yii2textareaautosize::widget([
      'model'=> $model,
      'attribute' => 'fieldname',

  //or to use with form

  echo $form->field($model, 'amount')->widget(net\frenzel\textareaautosize\yii2textareaautosize::classname(), [

Minimum CSS Requirements

The only requirement is to set box-sizing: border-box and a min-height on the textarea. In the example below, the minimum height is one line of text which is determined from the base font size, line height, and vertical padding and border.

textarea {
  box-sizing: border-box;
  max-height: 94px; /* optional, but recommended */
  min-height: 31px;
  overflow-x: hidden; /* for Firefox (issue #5) */

Increase the min-height to have more initial rows. Once text exceeds that minimum height the textarea will expand naturally. The overflow-x setting is for Firefox to prevent an initial additional line from appearing.


GitHub Stars
GitHub Forks



1.2.0 is the latest of 6 releases

MIT license
1 github stars & 6 github forks
0 downloads in the last day
0 downloads in the last 30 days
813 total downloads