Skip to main content
100%

A circle to follow the mouse

✓ Published1🌍 Public
FFlorian Kotthoff
Last edited Aug 30, 2021
Created on Aug 30, 2021

A yellow circle follows the mouse cursor across a 960x500 SVG canvas. The React app uses the `useState` hook to track mouse coordinates and `useCallback` to handle mouse movement events, updating the circle's `cx` and `cy` attributes. The SVG is rendered via ReactDOM, with the circle's position initialized to the canvas center.

AI-generated description

A circle that follows the mouse.

MIT Licensed

Similar vizzes