Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

fa39fe5a949a4ee39112ff881b278854

Mouse Follower

0 stars1🌍 Public
Ddrandalldesign
Last edited Dec 30, 2024
Created on Dec 30, 2024

A yellow circle tracks the mouse cursor across a full-window SVG canvas. The visualization is built with React and ReactDOM, using the `useState` hook to store the cursor's current position. On every `onMouseMove` event, the circle's `cx` and `cy` attributes update, re-rendering the circle at the new coordinates. The code initializes the circle at the window's center and sets a fixed radius of 30 pixels.

AI-generated description

Follows mouse with a circle