I can\'t quite find a clear answer on this, and excuse me if there is one I\'ve missed.
I want my text input widths to automatically adjust to the size of the conten
input.addEventListener('input', () => input.style.width = input.scrollWidth);
Unfortunately this will only increase the size of the input. If you delete characters the size will not decrease. For some use cases this is perfectly fine.