JSFiddle - React, Tailwind, and code Playground

HTML

<canvas width="300" height="300"></canvas>

CSS

canvas {
  border: 1px solid black;
  background: #fff;
}

JavaScript

var ctx = document.querySelector('canvas').getContext('2d');
ctx.fillStyle = '#FF004D';
ctx.fillRect(10, 10, 100, 100);
ctx.fillRect(190, 10, 100, 100);
ctx.fillStyle = 'rgba(41, 173, 255, 0.8)';
ctx.fillRect(50, 50, 100, 100);
ctx.strokeStyle = '#fff';
ctx.lineWidth = 5;
ctx.strokeRect(50, 50, 100, 100);