🌍 Public
Viewing a saved revision (read-only)
45f1f6716cf9400388fdbcda7befe60d
mouse follower
A circle in an SVG chart follows the mouse cursor, growing larger as the cursor moves right and down across the 960 by 500 pixel viewport. The React component uses the `useState` and `useCallback` hooks to track the cursor's `clientX` and `clientY` coordinates, which are then bound to the circle's `cx`, `cy`, and `r` attributes. Mouse movement is handled by an `onMouseMove` event on the SVG element, and the circle's radius is calculated as the sum of the coordinates divided by 30.
AI-generated descriptionMouse followers