D3 Course: Face Part 2
✓ Published1🌍 Public
This example shows a yellow cartoon face made of three SVG circles—one for the head and two for the eyes—rendered inside a React application. The head’s position and radius are calculated from the viewport dimensions, with the eye offset and radius defined as constants. The code uses React and ReactDOM to render the SVG elements, which are drawn using standard SVG circle tags, not D3 APIs. The face is centered on a 960 by 500 pixel canvas, with the stroke width subtracted from the radius to keep the outline visible.
AI-generated descriptionFace part 1 with HTML, CSS, SVG & React
MIT Licensed