Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Mouse Follower

Public visualization

Viewing a saved revision (read-only)

0afbe616520c425089ae061c1f8d2a0a

Mouse Follower

0 stars0🌍 Public
Nnqu9DL
Last edited Mar 2, 2021
Created on Mar 2, 2021

A smiling face emoji, rendered as a single SVG circle, follows the mouse cursor across a 960 by 500 pixel canvas. The React component uses the `useState` hook to track the mouse position, which is updated on every `onMouseMove` event on the SVG element. React 16.9 handles the state-driven re-rendering, while D3 v5 is loaded but not directly used in this example. The circle’s center coordinates are bound to the current mouse position within the SVG coordinate system.

AI-generated description

Smiley face implementation with React & D3, using a React component.