Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley Face (React & D3)

Public visualization

Smiley Face (React & D3)

0 stars2🌍 Public
SSonja Ek
Last edited May 31, 2021
Created on May 28, 2021
Forked from Hello VizHub

A React component renders a smiley face as scalable vector graphics (SVG), composed of a yellow background circle, two dark eyes, and a curved mouth. The face is assembled from reusable components—BackgroundCircle, Eyes, Mouth, and FaceContainer—which accept props for positioning and sizing. The mouth path is generated using D3’s `arc()` generator with specified inner and outer radii and angles, while the overall layout is centered via SVG transforms. The example demonstrates integrating D3 for geometry generation within a React component structure.

AI-generated description

Smiley face drawn with React and d3.

Comments

Sign in to join the discussion.

MIT Licensed