Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
GGino
Last edited Nov 14, 2022
Created on Nov 14, 2022

A circle follows the mouse cursor across a full-screen SVG canvas, its position updating in real time to mirror the user's movement. The example demonstrates state-driven rendering with React, using the `useState` hook to track cursor coordinates and the `useCallback` hook to handle `mousemove` events efficiently. The SVG is sized to the browser window, and the circle's center is set via `cx` and `cy` properties tied directly to the current mouse position state.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes