JSFiddle - React, Tailwind, and code Playground

by zerrax

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.1/Chart.js"></script>
<div class="dashboard login">
  <label>
    <a style="display:none;">Login</a>
    <input name="login" type="radio" checked>
    <div class="login-block">
    <h1>Login</h1>
    <from>
    <input type="text" value="" placeholder="Username" id="username" />
    <input type="password" value="" placeholder="Password" id="password" />
    <button>Submit</button>
    </from>
    </div>
  </label>
  <label style="display:none;">
    <a>Register</a>
    <input name="login" type="radio">
    <div class="login-block">
     <h1>Login</h1>
    <input type="text" value="" placeholder="Username" id="username" />
    <input type="password" value="" placeholder="Password" id="password" />
    <input type="password" value="" placeholder="Password" id="password" />
    <input type="text" value="" placeholder="Email" id="username" />
    
    <button>Submit</button>
    </div>
  </label>
</div>

CSS

html, body {
  height: 100%;
  font-family: 'Lato', sans-serif;
}
body {
  background: linear-gradient(135deg, rgba(65,131,155,1) 0%,rgba(51,98,123,1) 100%);
  padding:0;
  margin:0;
}
*:focus {
    outline: none;
}
* {
  box-sizing: border-box;
}
.dashboard {
  width: 80%;
  background: #202b33;
  margin: 60px auto;
  border-radius: 4px;
  overflow: hidden;
  min-height:350px;
  display: grid;
grid-template-columns: 20% 80%;
position:relative;
}
.dashboard > div{
      padding: 30px
}
.dashboard > div > label > a{
  color:#fff;
  display:none;
 
}
.dashboard > div > label > a:hover{
  color:#ddd;
    cursor:pointer;
}
.dashboard > div > label > input[type="checkbox"]{
  display:none; 
}
.dashboard > div > label > span {
 margin-top:15px;
 }
.dashboard > div > label > span > h4{
  text-align:center;
  margin: 10px 0;
      font-size: 13px;
    font-weight: 200;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    color:white;
}
.dashboard > div > label  > span > ul{
  text-align:center;
  list-style:none;
  padding:0;
  margin:0;
  text-align:left;
  padding-left:5px;
  padding-right:5px;
      margin: 24px 0;
}
.dashboard > div > label > span > ul > li{
  text-align:center;
   text-align:left;
   cursor:pointer;
     overflow: hidden;
  //text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard > div > label > span > ul > li > a{
  background: rgba(255,255,255,0.2);
  border-radius:100%;
  padding:3px 7px;
  margin: 0 15px;
  color:white;
}
.dashboard > div > label > span > ul > li:first-child {
    height: 35px;
    line-height: 35px;
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    cursor: default;

}
.dashboard > div > label > span > ul > li:hover:first-child {

}
.dashboard > div > label > span > ul > li:hover {
  color:white;
}
.dashboard > div > label > span > ul > li {
    display: block;
    height: 30px;
    width: 100%;
    line-height: 30px;
    font-size: 14px;
    font-weight: 200;
    color: rgba(255, 255,...

JavaScript

var chartColors = {
  red: 'rgb(255, 99, 132)',
  orange: 'rgb(255, 159, 64)',
  yellow: 'rgb(255, 205, 86)',
  green: 'rgb(75, 192, 192)',
  blue: 'rgb(54, 162, 235)',
  purple: 'rgb(153, 102, 255)',
  grey: 'rgb(231,233,237)'
};

var randomScalingFactor = function() {
  return (Math.random() > 0.5 ? 1.0 : -1.0) * Math.round(Math.random() * 100);
}
var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var config = {
  type: 'line',
  data: {
    labels: ["January", "February", "March", "April", "May", "June", "July"],
    datasets: [{
      label: "My First dataset",
      backgroundColor: chartColors.red,
      borderColor: chartColors.red,
      data: [
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor()
      ],
      fill: false,
    }, {
      label: "My Second dataset",
      fill: false,
      backgroundColor: chartColors.blue,
      borderColor: chartColors.blue,
      data: [
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor(),
        randomScalingFactor()
      ],
    }]
  },
  options: {
    responsive: true,
    title: {
      display: false,
    },
    legend: {
   		display: false
    },
    tooltips: {
    	enabled: false
    },
    hover: {
      mode: 'nearest',
      intersect: true
    },
    scales: {
      xAxes: [{
        display: false
        }],
      yAxes: [{
        display: false,
      }]
    }
  }
};


var ctx = document.getElementById("canvas").getContext("2d");
var ctx1 = document.getElementById("canvas1").getContext("2d");
var ctx2 = document.getElementById("canvas2").getContext("2d");
var ctx11 =...