JSFiddle - React, Tailwind, and code Playground
HTML
<canvas></canvas>
JavaScript
var canvas = document.querySelector('canvas');
var context = canvas.getContext('2d');
context.strokeStyle = 'blue';
context.strokeRect(0,0,100,100);
context.fillStyle = 'red';
context.fillRect(50,50,100,100);