Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
Jjinglejiang
Last edited Aug 12, 2021
Created on Aug 12, 2021
Forked from Mouse Follower

A circle inside an SVG viewport follows the mouse cursor in real time, updating its position on every mouse movement. Built with React Hooks (`useState` and `useCallback`), the `onMouseMove` event handler captures `clientX` and `clientY` coordinates and stores them in state, re-rendering the `<circle>` element’s `cx` and `cy` attributes. The chart uses React and ReactDOM for rendering, with a plain SVG circle as the visual element.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes