JSFiddle - React, Tailwind, and code Playground

HTML

<canvas class="box" ></canvas>

CSS

.box {
  transition:2s linear;
}

JavaScript

var box = document.querySelector(".box");
box.style.backgroundColor = "black";
box.style.width = "300px";
box.style.height = "300px";
var ctx = box.getContext("2d");
ctx.strokeStyle = "white";
ctx.lineWidth = 5;
ctx.beginPath();
ctx.moveTo(130,50);
ctx.lineTo(180,100);
ctx.moveTo(180,50);
ctx.lineTo(130,100);
ctx.stroke();