Textarea Autosize
Automatically update the height of a textarea depending on the content.
# Anatomy
Using the code below, the textarea height is updated as you type to fit the content. Size changes are also respected by leveraging Resize Observer.
<script>
import { createTextareaAutosize } from '@grail-ui/svelte';
const { useTextareaAutosize } = createTextareaAutosize();
</script>
<textarea use:useTextareaAutosize /># API
# TextareaAutosizeReturn
| Property | Description |
|---|---|
useTextareaAutosize |
Action<HTMLTextAreaElement, void>Action for the textarea that needs to be resized. |