Skip to main content
100%

Fork of HTML Starter

✓ Published0🌍 Public
DDavid Adelekan
Last edited Jun 13, 2021
Created on Jun 13, 2021
Forked from HTML Starter

This example demonstrates a circle following the mouse cursor inside an SVG canvas using React’s `useState` hook to track position changes. The visualization updates the circle’s `cx` and `cy` attributes in response to the `onMouseMove` event, rendering with ReactDOM and D3.js v5 as a dependency. The code relies on clientX and clientY coordinates from the event object to reposition the circle dynamically, with the initial state centered at half the SVG’s width and height.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes