1. autosize
Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
autosize
Package: autosize
Created by: jackmoore
Last modified: Mon, 13 Feb 2023 22:15:47 GMT
Version: 6.0.1
License: MIT
Downloads: 2,126,898
Repository: https://github.com/jackmoore/autosize

Install

npm install autosize
yarn add autosize

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

Install via NPM

 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.

 // 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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code