JSFiddle - React, Tailwind, and code Playground
HTML
<canvas width="400" height="400" id="foo"></canvas>
JavaScript
var canvas = document.getElementById("foo");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#c8a";
ctx.fillRect(0, 0, 100, 100);
ctx.fillStyle = "#225";
ctx.fillRect(100, 100, 100, 100);