Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of Let's make a face with D3.js

Public visualization

Fork of Let's make a face with D3.js

0 stars0๐ŸŒ Public
HHarishma Nallala
Last edited Jun 18, 2022
Created on Jun 18, 2022

This example builds a smiling face in SVG using D3.js v5 and React, with a yellow circle for the head, two eyes, and an arc-based mouth. The code uses `d3.arc` to generate the mouth path and `d3.select` to append and style elements. An animated eyebrow movement is achieved with chained `transition` calls that shift a group containing two rectangles up and down over two-second durations. The face is centered via SVG transforms, with positions calculated from the viewport dimensions.

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