Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars0🌍 Public
SSamir Nandardhane
Last edited May 8, 2023
Created on May 7, 2023

A mouse-controlled circle follows the cursor across an SVG canvas, changing its fill color randomly with every mouse movement. Built with React and D3, the component tracks client coordinates through an `onMouseMove` handler and updates the circle’s `cx`, `cy`, and `fill` attributes via state. The example demonstrates reactive SVG rendering with D3’s `rgb` color generator.

AI-generated description

A program that follows your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed