Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower Cross hair

Public visualization

Mouse Follower Cross hair

0 stars0🌍 Public
Sshaji K
Last edited May 7, 2021
Created on May 7, 2021

A circle and two crosshair lines track the mouse cursor in real time over a fixed-width SVG canvas. The React application captures pointer movement through an `onMouseMove` event handler, updating state that repositions the red dot and the intersecting vertical and horizontal lines. React's `useState` and `useCallback` hooks manage the coordinate updates, while ReactDOM renders the SVG elements directly in the browser.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed