Skip to main content
100%

D3 and React Smiley

✓ Published1🌍 Public
GGordon Yang
Last edited Apr 7, 2021
Created on Apr 7, 2021
Forked from Hello HTML

This example shows a smiley face composed of SVG shapes, with a yellow circular background, two black eyes, and an arc-shaped mouth. The face is built from reusable React components—BackgroundCircle, Eyes, and Mouth—assembled within a FaceContainer that wraps the SVG and applies a translation to center the graphic. The mouth uses the d3.arc() API to generate an SVG path with specified inner and outer radii and angular extents, while the overall layout is positioned using React props passed from the top-level App component.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes