β 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!
Top comments (0)