🌍 Public
Viewing a saved revision (read-only)
1f5140fc2cb643fcb3001a05a0d52c45
MDN colors Visualization
This example shows a simple interactive SVG visualization where a circle follows the user’s cursor movements across the viewport. It uses React state to track the cursor’s clientX and clientY coordinates via an onMouseMove handler, then re-renders the circle’s position accordingly. The circle is drawn with a custom stroke width and radius, while the cursor is hidden using CSS. The code imports the d3.arc function but does not use it in the visible logic, relying instead on React’s useCallback and useState hooks.
AI-generated descriptionCursor follower