Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

auto increase hight of textarea with alpine js

<textarea
  x-data="{ resize: () => { $el.style.height = '5px'; $el.style.height = $el.scrollHeight + 'px' } }"
  x-init="resize()"
  @input="resize()"
></textarea>
Source by benborgers.com #
 
PREVIOUS NEXT
Tagged: #auto #increase #hight #textarea #alpine #js
ADD COMMENT
Topic
Name
3+5 =