Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 380 Bytes

File metadata and controls

24 lines (19 loc) · 380 Bytes
category
Browser

useTextareaAutosize

Automatically update the height of a textarea element depending on its content.

Usage

<script setup lang="ts">
const { textarea, input } = useTextareaAutosize()
</script>

<template>
  <textarea
    ref="textarea"
    v-model="input"
    class="resize-none"
    placeholder="What's on your mind?"
  />
</template>