Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse follower

Public visualization

Mouse follower

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed