JSFiddle - React, Tailwind, and code Playground

HTML

<canvas id = "hello" width = "500px" height = "300px" style="border: 1px solid BLACK";></canvas>

JavaScript

var img = new Image;
var canvas = document.getElementById("hello");
var context = canvas.getContext("2d");

img.onload = function(){
	img.style.transform = "rotateZ(30deg)";
	context.drawImage(img, 0 ,0, 500, 300);	
}

img.src = "https://www.enterprise.com/content/dam/global-vehicle-images/cars/CHRY_200_2015.png";