@excalidraw-skill-pack/render
v0.2.0
Published
Render Excalidraw JSON to PNG. Node binding for excalidraw-skill-pack.
Readme
excalidraw-render
Node.js renderer for Excalidraw JSON → PNG, using Playwright + Chromium.
Install
npm install @excalidraw-skill-pack/renderUsage
Library
import { renderToPng } from "@excalidraw-skill-pack/render";
import { readFile, writeFile } from "node:fs/promises";
const json = await readFile("diagram.excalidraw", "utf-8");
const png = await renderToPng(json, { theme: "default-sketchy", scale: 2, width: 1200 });
await writeFile("diagram.png", png);CLI
excalidraw-render diagram.excalidraw --theme default-sketchy --output diagram.png --scale 2 --width 1200Options
| Option | Default | Description |
|--------|---------|-------------|
| --theme | default-sketchy | Theme name |
| --output / -o | <input>.png | Output path |
| --scale | 2 | Device pixel ratio |
| --width | 1200 | Max viewport width in px |
