Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Mouse Follower

Public visualization

Viewing a saved revision (read-only)

9e3f9f149a174e32a3ddb2a8d05e07d9

Fork of Mouse Follower

0 stars0🌍 Public
EEverton Rocha
Last edited Mar 10, 2021
Created on Mar 10, 2021
Forked from Mouse Follower

A circle follows the mouse cursor across a 960 by 500 SVG canvas, updating its position in real time. Built with React, the app tracks `onMouseMove` events to store the cursor’s coordinates in state and re-renders a single `<circle>` element with the new `cx` and `cy` values. The example uses React’s `useState` and `useCallback` hooks alongside ReactDOM, with visual output rendered entirely as SVG.

AI-generated description

A program that follows your mouse with a circle.