Patterns that survive production
Lifecycle, events, resize, state boundaries, serialization, and cleanup—without pretending Fabric.js is the DOM.
Open-source developer toolkit
Practical React + Fabric.js patterns for image editors, annotation tools, whiteboards, and every canvas app in between.
import { Canvas, Rect } from 'fabric'
import { useEffect, useRef } from 'react'
export function Editor() {
const ref = useRef(null)
useEffect(() => {
const canvas = new Canvas(ref.current)
canvas.add(new Rect({
fill: '#5b5cf0',
width: 120, height: 120
}))
return () => canvas.dispose()
}, [])
return <canvas ref={ref} />
}
Live example
Select, move, scale, edit, and export. This demo runs entirely in your browser with Fabric.js.
Select any object to edit it
Lifecycle, events, resize, state boundaries, serialization, and cleanup—without pretending Fabric.js is the DOM.
Each guide starts from working code, not a disconnected API reference or a screenshot of the happy path.
We are validating a commercial starter kit for teams that would rather ship features than rebuild undo and layers.
Quick start
Start with Fabric.js directly. The open-source React integration is being updated for current React and Fabric.js versions.
Follow development on GitHubnpm install fabricimport { Canvas } from 'fabric'
const canvas = new Canvas('canvas', {
width: 800,
height: 600,
backgroundColor: '#f7f7fb'
})
Building an editor?
Your use case will shape the open-source library and the upcoming Editor Starter Kit.
Share your use case