<input type="text" id="foo" value="Nice">
<input type="text" id="bar" placeholder="People">
<input type="text" id="baz" placeholder="Matter">
autosizeInput(document.querySelector('#foo'))
autosizeInput(document.querySelector('#bar'))
autosizeInput(document.querySelector('#baz'), { minWidth: true })

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://wzrd.in/standalone/autosize-input@latest