🌍 Public
Fork of HTML
A grid of 18 smiley face SVGs is rendered using a combination of React and D3. Each face is randomly generated with varying stroke widths, eye radii, and mouth dimensions, resulting in a diverse array of expressions. The faces are constructed from modular components (`BackgroundCircle`, `Eyes`, `Mouth`) that assemble within an SVG container, with the mouth shape drawn using D3’s `arc()` path generator. React’s `range()` and `map()` functions iterate to produce the grid, while ReactDOM renders the final composition into the page.
AI-generated descriptionUsing React, D3, ES6, JS, HTML and CSS to create an array of randomized faces.
HTML CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.