JSFiddle - React, Tailwind, and code Playground

by eprouver

CSS

svg{
    width: 100%;
    height: 100%;
}

.node circle {
    cursor: pointer;
    fill: #fff;
    stroke: #134D40;
    stroke-width: 1.5px;
}
.node text {
    font-size: 21px;
}
path.link {
    fill: none;
    stroke: #9C6BCB;
    stroke-width: 1.5px;
    -webkit-transition: stroke 0.5s ease;
}

path.thepath{
    stroke: #FACD05;
    stroke-width: 5px;   
}

JavaScript

var names = ["Modeling with periodic functions",
    "Constructing linear and exponential functions",
    "Modeling with periodic functions 2",
    "Addition and subtraction word problems within 100: Level 4",
    "Addition and subtraction word problems within 100: Level 1",
    "Comparing linear functions applications",
    "Addition and subtraction word problems within 100: Level 3",
    "Making line plots, bar graphs, and picture graphs",
    "Interpreting scale drawings",
    "Constructing 2D figures",
    "Adding and subtracting negative numbers word problems",
    "Circles and Pythagorean identities",
    "Solving for unknown angles",
    "Understanding addition and subtraction on the number line",
    "Constructing proportions to solve application problems",
    "Area, volume, and surface area",
    "Rules for multiplying and dividing negative numbers",
    "Interpreting linear expressions",
    "Addition and subtraction word problems within 100: Level 2",
    "Linear equation word problems",
    "Operations with rational numbers",
    "Simple probability",
    "Understanding addition and subtraction with negative numbers",
    "Variation in samples",
    "Manipulating linear expressions with rational coefficients",
    "Comparing populations",
    "Multi-step rational number word problems",
    "Probability models",
    "Finding probability",
    "Constructing and comparing proportional relationships",
    "Qualitatively defining rigid transformations",
    "Performing transformations on the coordinate plane",
    "Transforming polygons",
    "Symmetry of two-dimensional shapes",
    "Quantitatively defining rigid transformations",
    "Dilations",
    "Performing transformations on the coordinate plane",
    "Trigonometric functions and side ratios in right triangles",
    "Exploring rigid transformations and congruence",
    "Non-right triangle proofs"];

function addChild(depth) {
    depth -= 1;
    var name = names[~~(Math.random() * names.length)];
...