Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

MDN colors Visualization

Public visualization

MDN colors Visualization

0 stars1🌍 Public
OOm Kakatkar
Last edited Jul 30, 2023
Created on Jul 29, 2023
Forked from Fork of Hello HTML

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 description

Cursor follower

Comments

Sign in to join the discussion.

MIT Licensed