JSFiddle - React, Tailwind, and code Playground

HTML

<canvas id="myCanvas" width="500" height="550" style="border:1px solid #c3c3c3;">

JavaScript

var canvas = document.getElementById("myCanvas");
var context = canvas.getContext('2d');

context.beginPath();
context.rect(5, 5, 380, 240);
context.fillStyle = 'yellow';
context.fill();
context.lineWidth = 7;
context.strokeStyle = 'black';
context.stroke();