Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Fork of Mouse Follower

0 stars0🌍 Public
KKeyvan Rezaei
Last edited May 18, 2021
Created on May 18, 2021
Forked from Mouse Follower

An interactive React application renders an SVG circle that tracks the mouse cursor across a 960×500 viewport. The component uses React’s `useState` and `useCallback` hooks to update the circle’s `cx` and `cy` attributes on every `onMouseMove` event, reading coordinates from `clientX` and `clientY`. The circle has a fixed radius of 30 pixels and starts at the viewport’s center. This minimal example demonstrates state-driven SVG positioning with React and ReactDOM.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed