Skip to main content
100%

Follow Mouse

✓ Published1🌍 Public
CChaz
Last edited Jan 18, 2022
Created on Jan 17, 2022
Forked from Fork of Hello HTML

A single circle follows the mouse cursor across an SVG canvas, tracking its exact position in real time. The visualization uses React’s `useState` hook to store the cursor’s coordinates, updated via an `onMouseMove` event handler on the `<svg>` element. The circle’s `cx` and `cy` attributes are bound to the state, causing React to re-render the shape with each movement. The code imports React, ReactDOM, and D3 v7, though D3 is not actively used beyond the script tag.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes