Track Mouse Position
Use useMousePosition() to receive normalized mouse coordinates streamed from the desktop app. Values are normalized to the wallpaper window: x and y both range from -1 to 1, with y using a math-style axis (+1 = top).
Basic Usage
Convert the normalized coordinates to pixels before using them in CSS:
With Animation
Spring physics smooth out the cursor following:
Notes
- Returns
{ x: 0, y: 0 }until the first mouse event arrives. - Coordinates are window-relative — multi-window setups receive separate streams keyed by
window_label. - Works only inside the Fluxlay desktop app.
See the useMousePosition Reference for full API details.