JSFiddle - React, Tailwind, and code Playground

by farazshaikh

HTML

<canvas width="600px" height="600px"></canvas>

CSS

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

JavaScript

window.onload = function() {
	const canvas = document.querySelector("canvas");
	const ctx = canvas.getContext("2d");
	
	ctx.fillStyle = `black`;
 	ctx.fillRect(0, 0, canvas.width, canvas.height);
}