Skip to main content
100%

Fork of React Starter

✓ Published0🌍 Public
AAndré Thiago Netto
Last edited Mar 21, 2024
Created on Mar 21, 2024
Forked from React Starter

This example shows a simple yellow smiley face rendered as an SVG graphic, built with React and D3.js. It demonstrates how to compose reusable React components—`BackgroundCircle`, `Eyes`, and `Mouth`—that accept props for geometry and styling. The code uses `d3.arc()` to generate the mouth path, while circles for the face and eyes are placed using fixed coordinates derived from a 960×500 viewport. The rendering approach relies on declarative JSX and SVG elements, with D3 only for the arc path calculation.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes