Canvas shadowBlur Property

Watch a demo of different values of the shadowBlur property.

Or click a specific value to see the result:

shadowBlur = 50;
shadowBlur = 20;
shadowBlur = 10;
shadowBlur = 5;
shadowBlur = 2;
shadowBlur = 1;
shadowBlur = 0;
your browser does not support the canvas tag
your browser does not support the canvas tag
your browser does not support the canvas tag
your browser does not support the canvas tag
your browser does not support the canvas tag
your browser does not support the canvas tag
your browser does not support the canvas tag
const c = document.getElementById('myCanvas');
const ctx = c.getContext('2d');
ctx.shadowBlur=20;
ctx.shadowColor='#000000';
ctx.fillStyle='red';
ctx.fillRect(20,20,100,80);

Play more with the code in our Tryit yourself editor: Try it Yourself ❯