Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of React Starter

Public visualization

Fork of React Starter

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed