sveltronics

0.0.13 • Public • Published

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>

See the demos for using a particular utility functions.

Readme

Keywords

none

Package Sidebar

Install

npm i sveltronics

Weekly Downloads

89

Version

0.0.13

License

none

Unpacked Size

1.43 MB

Total Files

268

Last publish

Collaborators

  • vasucp1207