Skip to main content
100%

mouse_follower

✓ Published1🌍 Public
Iindranil-sri
Last edited Nov 8, 2021
Created on Nov 8, 2021
Forked from Smile part 1

This example demonstrates a yellow circle that follows the mouse cursor as it moves over an SVG canvas. The visualization uses React hooks, specifically `useState` and `useCallback`, to track the cursor’s `clientX` and `clientY` coordinates. An `onMouseMove` event handler updates the circle’s center position in real time. The rendering relies on React’s declarative JSX, with no D3 bindings, and the SVG is sized at 960 by 500 pixels, matching the viewport dimensions.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes