Follow Mouse
✓ Published0🌍 Public
This example shows a simple interactive face whose eyes follow the mouse cursor across an SVG canvas. The face is built from reusable React components—an outer circle, eyes, and an arc-based mouth—rendered as SVG primitives. As the user moves the mouse, React state updates the position of the black pupil circle via an `onMouseMove` handler. The code combines d3’s `arc` generator for the mouth with React’s `useState` and `useCallback` to manage the interactive tracking.
AI-generated descriptionA bare minimum HTML page.
MIT Licensed