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

A React component renders an SVG circle that follows the mouse cursor across a 960x500 viewport. The circle's center coordinates are updated through React's `useState` hook and an `onMouseMove` event handler, which captures the `clientX` and `clientY` positions. The app initializes the circle at the viewport center and redraws it with a constant radius of 30 pixels on every mouse movement, using React DOM to mount the component into the page.

AI-generated description

A program that follows your mouse with a circle.

Comments

Sign in to join the discussion.

MIT Licensed