Skip to main content
100%

MouseFollower

✓ Published0🌍 Public
YYodae Lim
Last edited Aug 18, 2023
Created on Aug 17, 2023

A circle follows the mouse pointer across an SVG canvas as a direct, real-time visual response. The visualization uses React hooks, specifically `useState` to store mouse coordinates and an `onMouseMove` event handler on the `<svg>` element to update the circle's `cx` and `cy` attributes. Rendered with React and SVG, the circle starts centered and moves smoothly to track `clientX` and `clientY` values from the event object.

AI-generated description

mouse follower

MIT Licensed

Similar vizzes