React Tree

In this example below you will see how to do a React Tree with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by -dan, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright -dan ©

Technologies

  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>React Tree</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="app"></app>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.min.js'></script>

  

</body>

</html>

/*Downloaded from https://www.codeseek.co/-dan/react-tree-JJXmOO */
.tree .node {
  display: flex;
  flex-flow: column wrap;
  height: 50px;
  background-color: red;
  flex: 1 0 50%;
  justify-content: space-between;
  align-items: stretch;
  align-content: stretch;
}

Comments