Skip to main content
100%

Dot color change when moving mouse

✓ Published0🌍 Public
Ggujjapooja7@gmail.com
Last edited May 7, 2023
Created on May 6, 2023
Forked from Hello VizHub

A circle follows the mouse pointer across an SVG canvas, and its fill color changes to a random value from a predefined palette on every mouse movement. The React application tracks mouse coordinates through an `onMouseMove` handler on the SVG element, updating state with `useState` to reposition the circle and select a new color. Rendering is handled by ReactDOM, which updates the circle’s `cx`, `cy`, and `fill` attributes in response to the state changes.

AI-generated description

A program that follows the mouse with a circle and dot color changes.

MIT Licensed

Similar vizzes