🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@frsource/autoresize-textarea

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frsource/autoresize-textarea

Minimalistic plugin to autosize your textareas! 💪

2.0.101
Version published
Weekly downloads
5.9K
7.76%
Maintainers
0
Weekly downloads
 
Created

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

FAQs

Package last updated on 07 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts