Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Ccynichole
Last edited Feb 14, 2022
Created on Feb 14, 2022

A React-based SVG visualization tracks the mouse cursor with a single orange circle, updating its position in real time as the user moves across the viewport. The app uses React’s `useState` and `useCallback` hooks to manage the cursor coordinates, while D3’s `arc` import is included but unused. The circle renders via SVG inside a fixed 960×500 canvas, with the initial position centered before any mouse movement. The `onMouseMove` event handler on the `<svg>` element captures client coordinates and triggers a state update, seamlessly animating the follower through React’s rendering lifecycle.

AI-generated description

A program that follows your mouse with a circle

MIT Licensed

Similar vizzes