Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

0c502b81c5644aacbba543a668395e36

Mouse Follower

0 stars0🌍 Public
Ttotallynormalpeep
Last edited Jun 20, 2021
Created on Jun 20, 2021

A yellow circle follows the mouse cursor across a 960-by-500 SVG canvas. Built with React and ReactDOM, the app tracks pointer coordinates via an `onMouseMove` handler on the SVG element, storing them in state with `useState` and updating them through `useCallback`. Each move re-renders the circle's `cx` and `cy` attributes, creating a direct, responsive visual link between pointer position and the rendered shape.

AI-generated description

A program that follows your mouse with a circle.