@frsource/autoresize-textarea
TypeScript icon, indicating that this package has built-in type declarations

2.0.72 • Public • Published

NPM version badge GZIP size calculated by bundlejs.com semantic-release badge license MIT badge

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

npm install @frsource/autoresize-textarea

yarn add @frsource/autoresize-textarea

pnpm add @frsource/autoresize-textarea

Modern JS/Typescript

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

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.

Questions

Don’t hesitate to ask a question directly on the discussions board!

Changelog

Changes for every release are documented in the release notes and CHANGELOG file.

License

MIT

Copyright (c) 2022-present, Jakub FRS Freisler, FRSOURCE

Package Sidebar

Install

npm i @frsource/autoresize-textarea

Weekly Downloads

2,973

Version

2.0.72

License

MIT

Unpacked Size

30.1 kB

Total Files

12

Last publish

Collaborators

  • frsgit