Skip to main content
100%

Smiley Part 1

✓ Published0🌍 Public
SSohana
Last edited Aug 7, 2023
Created on Aug 6, 2023
Forked from HTML Starter

This example builds a smiley face using React and D3’s `arc` generator for the mouth, rendered as SVG. It shows a yellow circle with black stroke, two black eyes, and a curved mouth, all positioned within a fixed 960×500 viewport. Dimensions and offsets (like eye radius and mouth width) are defined as constants. The code uses `ReactDOM.render` to mount the SVG, and D3 v5’s `arc` to compute the path for the mouth’s arc, while other shapes are plain SVG circles.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes