Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
TtrwMK
Last edited Oct 10, 2022
Created on Oct 10, 2022
Forked from Mouse Follower

This example shows a circle that continuously follows the mouse cursor across a full-window SVG canvas. Built with React, it tracks the cursor’s `clientX` and `clientY` coordinates through an `onMouseMove` event handler, storing the position in state via `useState` and updating the circle’s `cx` and `cy` attributes accordingly. The `useCallback` hook optimizes the event handler, and the component renders a single SVG `<circle>` element without any data source.

AI-generated description

A Program that follows your mouse with a circle

MIT Licensed

Similar vizzes