Minimalistic plugin to autosize your textareas! 馃挭
npm install @frsource/autoresize-textarea
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
``bash
npm install @frsource/autoresize-textarea
yarn add @frsource/autoresize-textarea
pnpm add @frsource/autoresize-textarea
`
`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();
`
`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.
Don鈥檛 hesitate to ask a question directly on the discussions board!
Changes for every release are documented in the release notes and CHANGELOG file.
Copyright (c) 2022-present, Jakub FRS Freisler, FRSOURCE