Skip to main content
100%

Smiley Face Part 2

✓ Published2🌍 Public
DDavid Allyn
Last edited Nov 8, 2021
Created on Nov 2, 2021
Forked from Smiley Face Part 1

This example shows the first step in constructing a smiley face, rendering a yellow circle as the head and two black-outlined circles as eyes. The face is drawn as an SVG using React elements, with positions and dimensions calculated from constants for the canvas width and height. The code uses ReactDOM to mount the component into the DOM, with the SVG output generated directly in JSX. The styling resets the page margin and hides overflow, focusing the view on the centered graphic.

AI-generated description

Half way to a smiley face

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

See also React Starter.

MIT Licensed

Similar vizzes