npm i sveltronics
<script>
import { resizeable, elementSize } from "sveltronics";
import { onMount } from "svelte";
let myEle;
let { height, width } = {};
onMount(() => {
({ height, width } = elementSize(myEle));
})
</script>
<div
bind:this={myEle}
use:resizeable
>
Resizeable
</div>
<div>Height: {$height}</div>
<div>Width: {$width}</div>