Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of Smiley Face Part V

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Fork of Smiley Face Part V

0 stars0
AAnthoVDO
Last edited Apr 19, 2021
Created on Apr 19, 2021
View stargazers

A grid of eighteen randomized smiley faces renders as SVG via React components, each with a yellow face, black stroke, offset eyes, and an arc-based mouth. The code splits reusable parts into separate ES6 modules (BackgroundCircle, Eyes, Mouth, FaceContainer) and uses React Fragments to group eye elements. It leverages d3’s `arc` generator for mouth paths and `range` for iteration, with ReactDOM mounting the app. Random values for eye offset, eye radius, and mouth dimensions generate subtle variations across the repeated faces.

AI-generated description

Splitting React components into multiple files using ES6 modules. Bonus: React Fragments!

Comments

Sign in to join the discussion.

MIT Licensed