JSFiddle - React, Tailwind, and code Playground

HTML

<div id="sheet-container">
  <canvas id="sheet" width="400" height="400"></canvas>
</div>

CSS

#sheet-container {
  width: 400px;
  height: 400px;
  border: 1px solid black;
}

JavaScript

var canvas = new fabric.Canvas('sheet');
canvas.isDrawingMode = true;
canvas.freeDrawingBrush.width = 1;
canvas.freeDrawingBrush.color = "#ff0000";
console.log(canvas);