Skip to main content
100%

Fork of Smiley Face Part V

✓ Published0🌍 Public
KKonJoDot
Last edited Oct 18, 2022
Created on Oct 18, 2022
Forked from Smiley Face Part V

Built with React and D3 v5, this example renders a yellow smiley face as modular SVG components in separate ES6 modules. The code defines `BackgroundCircle`, `Eyes`, and `Mouth` components, with the latter using the `arc` generator from D3 to create a curved path. A `FaceContainer` wraps the SVG and positions all elements via a translated group. The face’s geometry—eye offsets, radii, and mouth width—is passed as props, and the final composition is mounted with `ReactDOM.render`.

AI-generated description

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

MIT Licensed

Similar vizzes