---
name: "fabricjs-interactive-canvas-objects"
description: "Build interactive graphic design editors with selectable, draggable canvas objects."
metadata:
  author: "Fabric.js"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "create fabric.js canvas"
  - "make objects draggable canvas"
  - "export fabric canvas to svg"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Fabric.js Interactive Canvas Object Manipulation

Leverages Fabric.js: interactive object selection, rotating/scaling bounding boxes, image filtering, SVG serialization, free-drawing brush modes, and history undo stacks.

## When to Invoke
Invoke this skill whenever you need to:
- create fabric.js canvas
- make objects draggable canvas
- export fabric canvas to svg

## Execution SOP & Rules
1. Initialize canvas with const canvas = new fabric.Canvas('canvas-id', { selection: true }).
2. Add interactive objects using canvas.add(new fabric.Rect({ left: 100, top: 100, width: 80, height: 80 })).
3. Enable freehand drawing mode by setting canvas.isDrawingMode = true.
4. Export canvas contents via canvas.toJSON() or canvas.toSVG() for scalable reproduction.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
