🌍 Public
Viewing a saved revision (read-only)
1428093e80734cdd994a0ad5e47f1bf8
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.