Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed