Skip to main content
100%

Fork of Smiley Face Part II

✓ Published0🌍 Public
JJuan Raul de la Guardia
Last edited Aug 15, 2024
Created on Aug 15, 2024

A React and D3 smiley face fills the browser window as a yellow circle with two black eyes and a curved mouth drawn from the D3 arc generator. The app uses React 16.9 to render SVG elements, with the face centered dynamically based on window dimensions via `window.innerWidth` and `window.innerHeight`. D3 v5’s `arc()` defines the mouth path, while the face and eyes are plain SVG circles with fixed offsets and radii. The mouth radius, eye positions, and stroke width are all hard-coded constants, presenting a static face with no interactivity. The entire SVG is mounted into the DOM via `ReactDOM.render`.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes