Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

f3bec9dd92e1409da920a6858f628eb5

Mouse Follower

0 stars0🌍 Public
LLeah Mitchell
Last edited Sep 27, 2021
Created on Sep 6, 2021

A circle follows the mouse cursor across an SVG canvas. The React component tracks pointer movement via the `onMouseMove` event handler, updating the circle’s `cx` and `cy` attributes in state. Rendering uses React’s `useState` and `useCallback` hooks, with the coordinate system based on the browser’s `clientX` and `clientY` values.

AI-generated description

A program that follows your mouse with circle.