Skip to content

textarea-autosize 0.3.0

Install from the command line:
Learn more about npm packages
$ npm install @github/textarea-autosize@0.3.0
Install via package.json:
"@github/textarea-autosize": "0.3.0"

About this version

Textarea Autosize

Autosizes textarea to size of its contents.

Installation

$ npm install @github/textarea-autosize

Usage

The autosizing behavior must be explicitly activated on the <textarea>.

import autosize from '@github/textarea-autosize'
autosize(document.querySelector('textarea.foo'))

Using a library like selector-observer, the behavior can automatically be applied to any textareas matching a class name.

import {observe} from 'selector-observer'
import autosize from '@github/textarea-autosize'

observe('textarea.autosize', { subscribe: autosize })

Browser support

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer 11
  • Microsoft Edge

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.

Details


Assets

  • textarea-autosize-0.3.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0