Skip to main content
100%

Fork of Let's Make a Face Part I

✓ Published0🌍 Public
PPatrick Byron Gattoc
Last edited Sep 25, 2021
Created on Sep 25, 2021

This example shows a simple smiley face built from three SVG circles—a yellow head with a black outline and two eyes—rendered in a React component. It demonstrates how to use React to declaratively construct an SVG scene, computing positions with the constants `centerX`, `centerY`, `eyeOffsetX`, `eyeOffsetY`, and `eyeRadius`. The code uses ReactDOM to mount the component into the DOM, and the SVG elements are styled with attributes like `fill`, `stroke`, and `stroke-width`. No interactivity or animation is present beyond the static frame.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes