https://github.com/frsource/autoresize-textarea
Minimalistic plugin to autoresize your textareas 💪
https://github.com/frsource/autoresize-textarea
autoresize-textarea autosize js textarea
Last synced: about 1 month ago
JSON representation
Minimalistic plugin to autoresize your textareas 💪
- Host: GitHub
- URL: https://github.com/frsource/autoresize-textarea
- Owner: FRSOURCE
- License: mit
- Created: 2022-02-24T17:28:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-04-20T05:38:19.000Z (about 1 month ago)
- Last Synced: 2026-04-20T06:29:19.950Z (about 1 month ago)
- Topics: autoresize-textarea, autosize, js, textarea
- Language: TypeScript
- Homepage: https://www.frsource.org/autoresize-textarea/
- Size: 2.04 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Autoresize Textarea - minimalistic plugin to autosize your textareas! 💪
Getting Started
·
Demo
·
File an Issue
·
Have a question or an idea?
Tiny library which make your textareas fluid.
Mobile & desktop-friendly
Performant & with small bundle size (less than 1.2kB!)
Published as separate bundles for JS ES5 or modern browsers thanks to microbundle
Written completely in typescript
Published under MIT license
## Quick start
### Installation
```bash
npm install @frsource/autoresize-textarea
yarn add @frsource/autoresize-textarea
pnpm add @frsource/autoresize-textarea
```
### Modern JS/Typescript
```ts
import { attach } from '@frsource/autoresize-textarea';
const textarea = document.querySelector('textarea');
const { detach } = attach(textarea);
// detach plugin whenever you want (e.g. on component unmount)
// detach();
```
### UMD
```js
const textarea = document.querySelector('textarea');
const { detach } = window.autoresizeTextarea.attach(textarea);
// detach plugin whenever you want (e.g. on component unmount)
// detach();
```
For working example, check out [our demo](https://www.frsource.org/autoresize-textarea).
## Questions
Don’t hesitate to ask a question directly on the [discussions board](https://github.com/FRSOURCE/autoresize-textarea/discussions)!
## Changelog
Changes for every release are documented in the [release notes](https://github.com/FRSOURCE/autoresize-textarea/releases) and [CHANGELOG file](https://github.com/FRSOURCE/autoresize-textarea/tree/master/CHANGELOG.md).
## License
[MIT](https://opensource.org/licenses/MIT)
Copyright (c) 2022-present, Jakub FRS Freisler, FRSOURCE