Make your textareas auto-expand with just 3 lines of JavaScript!
→ No jQuery ✅
→ Lightweight ✅
→ Smooth UX ✅

const textarea = document.querySelector("textarea");
textarea.addEventListener("input", () => {
  textarea.style.height = "auto";
  textarea.style.height = textarea.scrollHeight + "px";
});

/* 
Copyright : Abdullah Al Masud
Facebook : Ctrl + Masud
*/

Perfect for forms, chat apps, and notes!