Gathering detailed insights and metrics for react-textarea-autosize
Gathering detailed insights and metrics for react-textarea-autosize
Gathering detailed insights and metrics for react-textarea-autosize
Gathering detailed insights and metrics for react-textarea-autosize
@types/react-textarea-autosize
Stub TypeScript definitions entry for react-textarea-autosize, which provides its own types definitions
react-autosize-textarea
replacement for built-in textarea which auto resizes itself
rich-textarea
A small customizable textarea for React to colorize, highlight, decorate texts, offer autocomplete and much more.
@twilio-paste/react-textarea-autosize-library
textarea component for React which grows with content
<textarea /> component for React which grows with content
npm install react-textarea-autosize
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.8
Supply Chain
96.3
Quality
87.1
Maintenance
100
Vulnerability
100
License
TypeScript (88.03%)
JavaScript (8.23%)
HTML (3.75%)
Total Downloads
867,826,624
Last Day
541,460
Last Week
2,950,538
Last Month
12,877,937
Last Year
137,512,723
MIT License
2,316 Stars
468 Commits
252 Forks
16 Watchers
3 Branches
60 Contributors
Updated on Apr 28, 2025
Minified
Minified + Gzipped
Latest Version
8.5.9
Package Id
react-textarea-autosize@8.5.9
Unpacked Size
86.44 kB
Size
8.21 kB
File Count
33
NPM Version
8.19.4
Node Version
16.20.2
Published on
Mar 30, 2025
Cumulative downloads
Total Downloads
Last Day
-5.7%
541,460
Compared to previous day
Last Week
-9%
2,950,538
Compared to previous week
Last Month
0%
12,877,937
Compared to previous month
Last Year
3.8%
137,512,723
Compared to previous year
3
1
33
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.
1import TextareaAutosize from 'react-textarea-autosize'; 2 3// If you use CommonJS syntax: 4// var TextareaAutosize = require('react-textarea-autosize').default; 5 6React.renderComponent( 7 <div> 8 <TextareaAutosize /> 9 </div>, 10 document.getElementById('element'), 11);
npm install react-textarea-autosize
https://andarist.github.io/react-textarea-autosize/
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 <textarea/>
, like style
, onChange
, value
, etc.
Get a ref to inner textarea:
1<TextareaAutosize ref={(tag) => (this.textarea = tag)} />
And then call a focus on that ref:
1this.textarea.focus();
To autofocus:
1<TextareaAutosize autoFocus />
(all HTML attributes are passed to inner textarea)
Because jest provides polyfills for DOM
objects by requiring jsdom and
react-test-renderer doesn't
provide refs for rendered components out of the box (calling ref callbacks with
null
), you need to supply a mocked ref in your tests in you need it for your tests.
You can do it like this (more can be read
here):
1const tree = renderer 2 .create(<TextareaAutosize />, { 3 createNodeMock: () => document.createElement('textarea'), 4 }) 5 .toJSON();
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 5
Reason
security policy file detected
Details
Reason
Found 8/18 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
41 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More