Fabric Post-it Example

A Post-it Note object for fabric.js.
View project on GitHub.

         
const fabricCanvas = new fabric.Canvas('canvas')

fabricCanvas.add(
   new fabric.Postit('Hello world!', {
      left: 20,
      top: 20,
      width: 280,
      height: 280,
      fontSize: 40,
      fontFamily: 'Serif'
   }),

   new fabric.Postit('This is a Post-it note', {
      left: 350,
      top: 60,
      width: 280,
      height: 280,
      fontSize: 30,
      fontWeight: 'bold',
      noteColor: '#ff02bb',
      stripColor: '#cc0197'
   }),

   new fabric.Postit('And another note, just for fun.', {
      left: 180,
      top: 260,
      width: 280,
      height: 280,
      fontSize: 30,
      noteColor: '#00ff4c',
      stripColor: '#00cc3d',
      fontStyle: 'italic',
      shadow: 'rgba(0,0,0,.3) 0 0 10px'
   })
);