Skip to main content
100%

Mouse Follower

✓ Published2🌍 Public
Iiffath.namira@csedge.org
Last edited Jan 9, 2025
Created on Jan 9, 2025

A black circle follows the mouse cursor across an SVG canvas, updating its position in real time with each mouse movement. The visualization uses React's `useState` and `useCallback` hooks to manage the circle's coordinates, while ReactDOM renders the SVG element. Mouse events are captured through the SVG's `onMouseMove` handler, which updates the circle's `cx` and `cy` attributes. The code imports React, ReactDOM, and D3 v5, though D3 is not utilized in the interaction logic itself.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes