Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

2fa782395d29406d9f25b96221c10c45

Mouse Follower

0 stars0🌍 Public
TTung Pham
Last edited Mar 14, 2021
Created on Mar 14, 2021

A yellow circle follows the mouse cursor across a full-window SVG canvas. The circle’s position updates in real time to match the cursor’s coordinates, offset slightly down and right. The visualization uses React with the `useState` hook to track mouse movement and re-render the SVG circle on each event. The `onMouseMove` event handler captures `clientX` and `clientY` from the JavaScript `MouseEvent`, and the circle is drawn with a fixed radius of 30 pixels and a fill color of `#fcd947`.

AI-generated description

A program that follows your mouse with a circle.