Skip to content

beeant/react-autosize-textarea

 
 

Repository files navigation

React Autosize Textarea

A light replacement for built-in textarea component which automaticaly adjusts its height to match the content. It does not require any polyfill

This module is based on the very popular autosize script written by Jack Moore. Check his website here for more documentation.

var TextareaAutosize = require('react-autosize-textarea');

React.renderComponent(
  <div>
    <TextareaAutosize {...textareaProps} onResize={() => {}} />
  </div>,
  document.body);

Live Demo

More Examples

###Install

npm install --save react-autosize-textarea

###API You can pass any props you're allowed to use with default React textarea (valueLink too).

You can also pass the callback onResize which will be triggered at any resize:

onResize: React.PropTypes.func

###Browser Compatibility

Chrome Firefox IE Safari Android
Yes Yes 9+ Yes 4+

About

A textarea perfectly compatible with ReactJS default one which auto resizes its height based on user input.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%