Skip to main content
100%

Mouse follower

✓ Published1🌍 Public
Nnahsiloh
Last edited Apr 2, 2021
Created on Apr 2, 2021

A smiley face rendered as a single SVG circle follows the mouse cursor across a 960×500 canvas. The React component tracks pointer coordinates via an `onMouseMove` handler and updates its position through `useState`, while D3’s `arc` utility is imported but unused. The circle’s `cx` and `cy` attributes are bound directly to the current mouse position, creating a smooth, direct mapping between input and visual output.

AI-generated description

Smiley face implementation with React & D3.

MIT Licensed

Similar vizzes