Skip to main content
100%

Fork of Hello HTML

✓ Published0🌍 Public
Rreactivicky
Last edited Apr 2, 2021
Created on Apr 2, 2021
Forked from Hello HTML

A circle follows the mouse cursor across an SVG canvas, responding to every movement with a smooth, immediate position update. Built with React and D3 v6, the example uses React's `useState` hook to track mouse coordinates and passes them as `cx` and `cy` attributes to a single SVG `<circle>` element. The `onMouseMove` event handler updates the state on each pointer movement, while the viewport is fixed to 960 by 500 pixels with no overflow. This demonstrates a minimal interactive pattern combining React's declarative state management with SVG rendering.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes