Skip to main content
100%

Mouse follower

✓ Published0🌍 Public
LLan Li
Last edited May 21, 2021
Created on May 21, 2021

This example shows a single black circle centered on a full-screen SVG that tracks the mouse position, logging each movement’s clientX and clientY coordinates to the console. Built with React 16.9 and ReactDOM, it uses an SVG onMouseMove event handler to capture pointer movement, with the circle’s position fixed at the viewport center rather than following the cursor. The rendering relies on React’s declarative JSX syntax within an SVG element, and the layout is adjusted to the browser’s window dimensions.

AI-generated description

a program that follows your mouse with a circle

MIT Licensed

Similar vizzes