Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

mouse follower

Public visualization

mouse follower

0 stars1🌍 Public
Nnourfahmy2003
Last edited Jul 27, 2022
Created on Jul 27, 2022
Forked from smily face 1

A circular SVG element follows the cursor as it moves across a 960x500 viewport. The visualization uses React's `useState` hook to track the mouse position via the `onMouseMove` event, updating the circle's `cx` and `cy` attributes in real time. The D3.js library is loaded but not used in the core interaction; the rendering relies entirely on React's declarative SVG output. This demonstrates a simple, direct mapping between pointer coordinates and a graphic element's position.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed