Skip to main content
100%

Mouse Follower

✓ Published1🌍 Public
RRandyElkins
Last edited Aug 9, 2021
Created on Aug 9, 2021

A circle follows the mouse cursor across the full browser window, changing its radius randomly with each movement. Built with React, the app tracks mouse coordinates via an SVG `onMouseMove` handler and updates the circle’s `cx`, `cy`, and `r` attributes through React state. The `useState` and `useCallback` hooks manage the position and re-render, while the radius is generated by a custom `randomIntFromInterval` function, resulting in a dynamic, size-shifting target.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes