MDN colors Visualization
✓ Published1🌍 Public
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
MIT Licensed