canvas-api
Installation
SKILL.md
Canvas API
The Canvas 2D API draws shapes, text, and images to a bitmap. In Node.js, the canvas package provides the same API for server-side image generation.
Setup (Node.js)
# Install node-canvas for server-side rendering. Requires system deps (Cairo).
npm install canvas
Creating a Canvas and Drawing Shapes
// src/canvas/shapes.ts — Create a canvas, draw rectangles, circles, and lines.
// Works identically in browser (document.createElement) and Node (createCanvas).
import { createCanvas } from "canvas";
const canvas = createCanvas(800, 600);
Related skills