Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
Mmoataznasr36
Last edited Oct 12, 2021
Created on Oct 12, 2021
Forked from React Starter

A circle follows the mouse cursor inside an SVG canvas, with its center tracking the pointer's position in real time. The visualization uses React's state management and event handling, specifically React.useState for storing coordinates and React.useCallback for the mouse move handler. The SVG element registers an onMouseMove event, and the circle's cx and cy attributes update accordingly. The code renders through ReactDOM.render, with the SVG viewport set to 960 by 500 pixels.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes