Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
Aask4jm
Last edited Jul 7, 2020
Created on Jul 6, 2020
Forked from HTML Starter

A circle follows the mouse cursor across an SVG canvas. The example demonstrates React state management for tracking pointer position and rendering a visual response. The component uses `useState` to store mouse coordinates and `useCallback` to handle the `onMouseMove` event, updating the circle's `cx` and `cy` attributes on each move. The SVG element listens for mouse events, and ReactDOM renders the interactive graphic. The circle is styled with a default black fill and no animation or smoothing, providing a direct, immediate link between input and visual output.

AI-generated description

A program that follows your mouse with a circle.

MIT Licensed

Similar vizzes