Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Modular Smiley - Part IV - React-JS

Public visualization

Modular Smiley - Part IV - React-JS

0 stars1🌍 Public
MMarcus Vinicius da Silveira Richa
Last edited Jan 6, 2022
Created on Jan 6, 2022

This example shows a modular smiley face built with React and D3, rendered as SVG. It separates the face into reusable components: a yellow background circle, two eyes, and a mouth drawn with D3's `arc` generator. The components are positioned using SVG `<g>` transforms for translation. The code uses D3 v7's `arc()` function to create the mouth path and React 17 for component composition, with `ReactDOM.render` mounting the app to the root element.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed