Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
LLucyI
Last edited Nov 16, 2021
Created on Nov 16, 2021

A single yellow circle of radius 30 follows the mouse cursor across an otherwise blank SVG canvas. The React app uses a `useState` hook to track mouse coordinates, updated via an `onMouseMove` event handler that reads `clientX` and `clientY`. The circle’s `cx` and `cy` attributes are bound directly to these state values, so its position re-renders on every pointer movement within the 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