Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
AAlex Stulov
Last edited Jul 6, 2021
Created on Jul 6, 2021
Forked from Hello HTML

A yellow circle follows the cursor across an SVG canvas, updating its position in real time. Built with React and D3 v7, the visualization uses React's `useState` and `useCallback` hooks to track mouse coordinates via the SVG `onMouseMove` event, then re-renders the circle with the new `cx` and `cy` attributes. The SVG rendering approach keeps the circle's radius constant at 30 pixels.

AI-generated description

Mouse follower

MIT Licensed

Similar vizzes