windowSizeStore

Reactive window size

Demo

0 X 0

Try resizing the window

(Cmd with (-/+))

Usage

<script>
import { windowSizeStore } from 'svelte-legos';

const size = windowSizeStore()
</script>

<div>Width: {$size.width}</div>
<div>Height: {$size.height}</div>