JSPM

  • Created
  • Published
  • Downloads 721793
  • Score
    100M100P100Q207725F
  • License MIT

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

Package Exports

  • autosize
  • autosize/src/autosize
  • autosize/src/autosize.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (autosize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Summary

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

Install via NPM

npm install autosize

Install via Bower

bower install autosize

Browser compatibility

Chrome Firefox IE Safari iOS Safari Android Opera Mini
yes yes 9 yes yes 4 ?

Usage

The autosize function accepts a single textarea element, or an array or array-like object (such as a NodeList or jQuery collection) of textarea elements.

// from a NodeList
autosize(document.querySelectorAll('textarea'));

// from a single Node
autosize(document.querySelector('textarea'));

// from a jQuery collection
autosize($('textarea'));

Full documentation can be found at jacklmoore.com/autosize

Released under the MIT License