{"repo":"Andarist/react-textarea-autosize","free":true,"listed":false,"github":"https://github.com/Andarist/react-textarea-autosize","clone":"git clone https://github.com/Andarist/react-textarea-autosize.git","description":"<textarea /> component for React which grows with content","language":"TypeScript","stars":2409,"topics":["react","react-component","javascript"],"license":"MIT","category":"ui-components","readme_excerpt":"react-textarea-autosize Drop-in replacement for the textarea component which automatically resizes textarea as content changes. A native React version of the popular jQuery Autosize! Weighs around 1.3KB (minified & gzipped). This module supports IE9 and above. Install npm install react-textarea-autosize Demo https://andarist.github.io/react-textarea-autosize/ Props Special props: prop type description ------------------- --------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- maxRows number Maximum number of rows up to which the textarea can grow minRows number Minimum number of rows to show for textarea onHeightChange func Function invoked on textarea height change, with height as first argument. The second function argument is an object containing additional information that might be useful for custom behaviors. Current options include { rowHeight: number } . cacheMeasurements boolean Reuse previously computed measurements when computing height of textarea. Default: false Apart from these, the component accepts all props that are accepted by , like style , onChange , value , etc. FAQ How to focus Get a ref to inner textarea: And then call a focus on that ref: To autofocus: (all HTML attributes are passed to inner textarea) How to test it with jest and react-test-renderer if you ne","default_branch":null,"files":null,"tree":[],"storefront":"/r/Andarist","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Andarist/react-textarea-autosize/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}