JSFiddle - React, Tailwind, and code Playground
HTML
<canvas width="20" height="20" id="canvas1" style="width: 80px; height: 80px;">
JavaScript
var ctx = document.getElementById('canvas1').getContext('2d');
ctx.strokeStyle = 'black'
ctx.strokeRect(5, 5, 10, 10);
ctx.fillStyle = 'rgba(0, 255, 255, 0.5)';
ctx.fillRect(5, 5, 10, 10);