Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower color changer

Public visualization

Viewing a saved revision (read-only)

a18ec1a22c65476f9558f1e432179e49

Mouse Follower color changer

0 stars0🌍 Public
Rrsulli4
Last edited Apr 28, 2023
Created on Apr 28, 2023
Forked from Mouse Follower

A React application renders an SVG circle that follows the mouse cursor across a full-screen viewport, changing its fill color randomly on every mouse movement. The circle starts at the center of the 960×500 SVG canvas and uses React’s `useState` and `useCallback` hooks to track the cursor’s client coordinates via the SVG `onMouseMove` event. Each move updates the circle’s position and generates new random RGB values for its fill using the `rgb()` color function. The visualization demonstrates real-time event handling and state-driven rendering with React and SVG.

AI-generated description

a program that followed your mouse with a circle.