Input elements within form fields have historically been the toughest to style. New CSS properties offer a much easier time, but user experience is still a tricky gray area.
One performance technique is to auto-fix fields within a form so that they expand or contract based on the user’s content. So an empty field would be much smaller than fully-entered fields, or perhaps they’d stay a fixed width based on the container element(useful for responsive design).
The minified JS file is only 1.5KB which is pretty reasonable for such a self-controlled library.
All you do is add the lib into your HTML document and call the Stretchy() API. It is possible to manually target new elements, but modern browsers support JS delegation so any new elements should be automatically targeted by Stretchy methods. Pretty great, eh?
Definitely check out the Stretchy main page if you’re curious to learn more. There’s plenty of easy-to-skim documentation along with a bookmarklet if you want to try out the effect before installing on a website.
And of course if you wanna pull down a copy of the repo just visit Stretchy on GitHub for the latest version.