All you have to do is download the fabric.js file from HERE and save it as a js file called fabric.js , and create the html file, assuming index.html , with the contents below.
To run this example, these fabric.js and index.html must be in the same folder.
<html> <head> <script src="fabric.js"></script> </head> <body> <canvas id="canvas" width="800" height="450" style="border:1px solid #000000"></canvas> <script> var canvas = new fabric.Canvas('canvas'); canvas.add(new fabric.Circle({ radius: 30, fill: '#f55', top: 100, left: 100 })); canvas.selectionColor = 'rgba(0,255,0,0.3)'; canvas.selectionBorderColor = 'red'; canvas.selectionLineWidth = 5; </script> </body> </html>
Option
You can download fabric.js in any format from HERE
source share