sveltronics

Sveltronics

Svelte utility functions for your project

svelte logo

Want a Svelte site built?

Hire a Svelte developer
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>

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer

Get New Themes & Resources

Loading Svelte Themes