Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Mouse Follower

0 stars1🌍 Public
PPABOML
Last edited Feb 11, 2022
Created on Jan 12, 2022

A full-screen SVG circle follows the mouse cursor as it moves across the viewport, using React state to track the pointer's coordinates. The component updates the circle's `cx` and `cy` attributes on every `mousemove` event via an `onMouseMove` handler, storing the position with `useState` and `useCallback`. React and ReactDOM render the interactive graphic at 960 by 500 pixels.

AI-generated description

Program that follows the mouth with a circle.

Comments

Sign in to join the discussion.

MIT Licensed