JSFiddle - React, Tailwind, and code Playground

by skane

HTML

<canvas id="can" width="10px" height="10px" style="width: 200px; height: 100px; background-color: teal;"/>

JavaScript

var ctx = can.getContext('2d')

var w = 4
var h = 4

ctx.fillRect(0, 0, w, h)