Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars2🌍 Public
Nnpelliccia
Last edited Jul 28, 2021
Created on Jul 28, 2021

A circle follows the mouse cursor across an SVG canvas, updating its position in real time. The React component uses the `useState` and `useCallback` hooks to track mouse coordinates from `onMouseMove` events, then passes those coordinates to the circle's `cx` and `cy` attributes. The visualization is rendered with ReactDOM into a 960×500 SVG viewport.

AI-generated description

A program that follows your mouse with a circle

Comments

Sign in to join the discussion.

MIT Licensed