A function that returns the size of an element.
<script lang="ts"> import { useElementSize } from "runed"; let el = $state() as HTMLElement; const size = useElementSize(() => el); </script> <div> <textarea bind:this={el} /> <p>Width: {size.width} Height: {size.height}</p> </div>