Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
LLei Lei
Last edited Jan 19, 2022
Created on Jan 16, 2022

A gray circle follows the mouse cursor across a full-window SVG canvas, updating its position in real time. Built with React, it tracks pointer movement via an `onMouseMove` handler and stores the coordinates in component state. The `useCallback` hook and `setMousePosition` update the circle's `cx` and `cy` attributes, rendering the responsive interaction.

AI-generated description

A programme that follows your mouse with a circle.

MIT Licensed

Similar vizzes