Mouse follower
✓ Published1🌍 Public
A circle follows the cursor as it moves across an SVG canvas. The example uses React’s `useState` and `useCallback` hooks to track mouse coordinates from the `onMouseMove` event, updating the circle’s `cx` and `cy` attributes in real time. The SVG’s width is fixed at 960 pixels and height at 500, with the initial position centered. The rendering is done entirely through React’s declarative component structure, producing a simple interactive visualization without any external data sources.
AI-generated descriptionMouse follower
MIT Licensed