Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Fork of Mouse Follower

0 stars0🌍 Public
MMark Hanly
Last edited Sep 26, 2023
Created on Sep 26, 2023
Forked from Mouse Follower

A single circle follows the mouse cursor inside an SVG canvas. The circle is initially centered and jumps to the exact screen coordinates of the pointer on every move. The interaction is built with React hooks, `useState` and `useCallback`, to track the cursor position and trigger an alert on click. The SVG element handles both `onMouseMove` and `onClick` events within the 960 by 500 pixel viewport.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed