Minimal Auto Growing Input Field Plugin For jQuery

File Size: 7.43 KB
Views Total: 1482
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Minimal Auto Growing Input Field Plugin For jQuery

autoGrowInput is a minimalist jQuery plugin which automatically adjusts the width of your input field while typing.

See also:

How to use it:

1. Import jQuery library and the script at the bottom of the document.

<script src="//"></script> 
<script src=""></script> 

2. Just call the plugin on the existing text input fields and we're done.


3. All the default settings.

// Maximum width of the input field. 
// An integer or a function that returns an integer.
maxWidth: 500,

// Minimum width of the input field.
minWidth: 20, 

// Extra space after the last character in the input field.
comfortZone: 0

Change log:


  • Fixed: Bumpy ride when the input has property 'text-transform: uppercase'


  • Don't create an input element on each plugin invocation


  • Fixed: jQuery input:text selector ignores text based html5 inputs


  • Fixed: When using JSDOM, prop returns undefined and eventually throws "Cannot call method 'replace' of undefined"


  • Support placeholder


  • Fixed cannot set comfortZone: 0

This awesome jQuery plugin is developed by Pixabay. For more Advanced Usages, please check the demo page or visit the official website.