JSFiddle - React, Tailwind, and code Playground

by trkli

HTML

<canvas></canvas>

CSS

canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  background: red;
}

JavaScript

var imageUrl = 'http://lorempixel.com/technics/200/200/'

var canvas = $('canvas')[0];
var ctx = canvas.getContext("2d");
ctx.filter = 'blur(10px)';

var image = new Image();
image.src = imageUrl;
image.onload = function() {
    ctx.drawImage(image, 0, 0);
};