mouseStore

Reactive mouse position

Demo

Move mouse to change the values

X: 0

Y: 0

Usage

<script lang="ts">
import { mouseStore } from 'svelte-legos';

const position = mouseStore();

// $position gives the
// Position { x: number, y: number } of the mouse
</script>