Skip to content

vasucp1207/sveltronics

Repository files navigation

lib-icon

Sveltronics

Svelte utility functions for your project

📦Installation

npm i sveltronics

🐰Usage

<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>

Releases

No releases published

Packages

No packages published