🌍 Public
Viewing a saved revision (read-only)
96def6733a4d4d60945b8c6202d06077
Lets Make a face with D3.js
This example builds a stylized face from basic SVG shapes using D3.js v5 and React. It draws a yellow circle for the head, adds eyes and eyebrows as circles and rectangles, and creates a mouth with a D3 arc generator. The eyebrows animate upward and back down using chained `transition().duration()` calls, creating a playful expression. The code selects the SVG element, calculates dimensions dynamically, and positions facial features relative to the center using translation transforms.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.