Skip to main content
100%

Fork of Mouse Follower

✓ Published0🌍 Public
RRoman Tolmachev
Last edited Aug 26, 2024
Created on Aug 26, 2024
Forked from Mouse Follower

A React application tracks the mouse and renders a circle that follows it across an SVG canvas. The component uses React hooks—`useState` to store the mouse position and `useCallback` for the move event handler. The SVG element listens for `onMouseMove` events, updating the circle's `cx` and `cy` coordinates based on the client X and Y values. The circle has a fixed radius of 30 pixels, and the viewport is 960 by 500 pixels. React DOM renders the app into a root div, with no external data source.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes