1.0.0 • Published 3 years ago

@rickmeijer/mousemove v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Small script that should track mouse movement over an element. Should be used other scripts that need the mouse position.

Usage:

import { mouseMove } from '@rickmeijer/utils/mousemove'

let interactiveHTMLElement = document.body;

mouseMove(interactiveHTMlElement, (x, y) => {
 // do stuff here with the mousecursor
}, .2);
1.0.0

3 years ago