talira

Fabric.js

A JavaScript HTML5 canvas library with an interactive object model and SVG parser

open sourceMITfree

Fabric.js is a JavaScript library that puts an interactive object model on top of the HTML5 canvas element. Shapes, images, paths and text become objects that users can select, move, scale, rotate and skew with on-canvas controls, and a whole canvas serialises to JSON or SVG and back. It parses complex SVG into canvas objects, edits rich text in place, applies WebGL or Canvas2D image filters, animates with tweening, supports clip paths, grouping, zooming and panning, and caches objects to draw complex scenes quickly. It's written in TypeScript, MIT licensed, and runs in the browser and, through the @fabricjs/node package, in Node.js.

Problems it solves

  • build an online design editor where users drag, resize and rotate shapes and images
  • let users customise a product image with text and stickers in the browser
  • load an SVG onto a canvas and let people edit its parts
  • save a canvas drawing as JSON and load it again later
  • export what users draw on a canvas as SVG or PNG

Features

  • interactive canvas objects with on-canvas controls
  • SVG-to-canvas and canvas-to-SVG parser
  • JSON serialisation
  • rich text editing on the canvas
  • WebGL and Canvas2D image filters
  • animation
  • clip paths, grouping and viewport zoom and pan
  • TypeScript types

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what Fabric.js does.

  1. p5.js A friendly tool for learning to code and make art

Compare Fabric.js with the top 3