Skip to main content
100%

Smiley Face Part 1

✓ Published0🌍 Public
Kkatebacon32
Last edited Mar 22, 2021
Created on Mar 22, 2021
Forked from HTML Starter

This example renders a yellow smiley face in an SVG canvas using React and D3. It draws three circles for the face and eyes, plus a D3 `arc` path for the mouth, all centered on a translated group. The code uses ReactDOM to inject the markup into the page, with D3’s `arc()` API generating the mouth geometry and static dimensions defining the layout. The result is a simple, hard-coded illustration without interactivity.

AI-generated description

Half way towards a smiley face HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes