Danh mục

jackmoore/autosize

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

snapshot · 26/10/2026
JA

jackmoore/autosize

JavaScript · danh tính provisional_slug_only

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

Đã lưu trữ
Sao5.1klịch sử sao
Hạng#11802snapshot toàn cục
Fork689bản ghi nguồn
Số ngày trending0lịch sử xu hướng
Snapshot chỉ có lịch sử sao đầy đủ của star-history/star-history. Lịch sử thiếu thì không vẽ.

README

Từ GitHub · lưu tạm tối đa 7 ngày

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