Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Dot color change when moving mouse

Public visualization

Viewing a saved revision (read-only)

e14ecdf6214243239b964d026687bbea

Dot color change when moving mouse

0 stars0🌍 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.