JavaScript Library For Form Element Autosizing – Stretchy

Category: Form , Javascript | July 30, 2018
Author: LeaVerou
Views Total: 154 views
Official Page: Go to website
Last Update: July 30, 2018
License: MIT


JavaScript Library For Form Element Autosizing – Stretchy


Stretchy is a lightweight and zero-dependency JavaScript library that auto resizes your form elements (textareas, input fields and select boxes) accordion their content when typing.

How to use it:

Just include the minified version of stretchy in your document and done.

<script src="stretchy.min.js" async></script>

Public methods.

// Autosize one element based on its content. 

// Apply Stretchy.resize() to a collection of elements, or all Stretchy is set to apply to, if no argument is provided.

// Can Stretchy be used on this particular element? (checks if element is in the DOM, if it's of the right type and if it matches the selector filter provided by data-stretchy-selector, if the attribute is set.

// Set to false to temporarily disable Stretchy.



  • Bugfix

You Might Be Interested In:

Leave a Reply