# autosize

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

Latest version **6.0.1** (published 2023-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install autosize
pnpm add autosize
yarn add autosize
bun add autosize
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2023-02-13 |
| First published | 2014-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/autosize) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5084 |
| Author | Jack Moore |
| Maintainers | jacklmoore |
| Keywords | textarea, form, ui |

## Links

- npm: https://www.npmjs.com/package/autosize
- Repository: https://github.com/jackmoore/autosize
- Homepage: http://www.jacklmoore.com/autosize
- Issues: https://github.com/jackmoore/autosize/issues
- npm.io page: https://npm.io/package/autosize

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 6.0.1 (latest) — 2023-02-13
- 6.0.0 — 2023-02-11
- 5.0.2 — 2022-11-20
- 5.0.1 — 2021-06-30
- 4.0.4 — 2021-05-17
- 5.0.0 — 2021-05-17
- 4.0.3 — 2021-05-15
- 4.0.2 — 2018-05-01
- 4.0.1 — 2018-03-23
- 4.0.0 — 2017-07-12
- 3.0.21 — 2017-05-19
- 3.0.20 — 2016-12-04
- 3.0.19 — 2016-11-23
- 3.0.18 — 2016-10-26
- 3.0.17 — 2016-07-25
- … 19 more at https://npm.io/package/autosize/versions

## README

## Summary

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

#### Demo

Full documentation and a demo can be found at [jacklmoore.com/autosize](http://jacklmoore.com/autosize)

#### Install via NPM
```bash
npm install autosize
```

#### 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.

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

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

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

Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php)

---
_Source: https://npm.io/package/autosize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
