Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 670 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 670 Bytes

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>