Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Ep 14 Interaction with React

Public visualization

Viewing a saved revision (read-only)

1a3cea331af84bf1a09fa312df4edf25

Ep 14 Interaction with React

0 stars0🌍 Public
SStoo Sepp
Last edited Oct 24, 2021
Created on Oct 24, 2021

A simple face made of SVG shapes responds to the mouse in real time. The code uses React state with a `useState` hook and `onMouseMove` handler to track cursor position, then updates a blue pupil circle accordingly. D3’s `arc` generator draws the mouth path, while static black eyes and a wheat-colored face circle are rendered as SVG elements. The example demonstrates combining D3’s geometry helpers with React’s declarative rendering for interactive visualizations.

AI-generated description

A program that follows your mouse with a circle.