Skip to content

About

KiCad WebView is a self-hosted JavaScript SDK to embed interactive KiCad schematics, PCB layouts, 3D boards, and Gerbers on websites and in documentation. MPL-2.0.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

64 Commits

Folders and files

Repository files navigation

KiCad WebView

Embed interactive KiCad schematics, PCB layouts, 3D boards, and Gerbers anywhere on the web — zero backend required.

License: MPL 2.0 Viewer checks Release 1.2.5 npm Documentation Sponsor

Live Demos · Quick Start · API Reference · Releases


KiCad WebView is a client-side JavaScript SDK for embedding read-only KiCad schematics, PCB layouts, interactive 3D boards, Gerbers, and BoMs in websites, docs, blogs, and apps. Everything runs in browser memory — no KiCad installation, account, or rendering server needed. Free to use, including commercially, under MPL-2.0.

Use KiCad WebView to embed a KiCad schematic or PCB on a website, such as a GitHub Pages project, a hardware design guide, or a web app. Open the live demos to try the controls before installing the SDK.

For reviewing saved revisions and project files from GitHub or GitLab, see KiCad Online. The KiCad viewer guide covers both workflows.

Quick Start (v1.2.5)

npm / ES Module

npm install @wayrisignals/kicad-webview@1.2.5
import { Viewer } from '@wayrisignals/kicad-webview';

const viewer = new Viewer('#board', { theme: 'dark', inspectOnSelect: false });
await viewer.load('/designs/project.zip', { view: '3d' });

Direct CDN (No Build Step)

<div id="board" style="height: 70dvh; min-height: 360px"></div>
<script src="https://cdn.jsdelivr.net/npm/@wayrisignals/kicad-webview@1.2.5/dist/kicad-webview.min.js"></script>
<script>
  const viewer = new KiCadWebView.Viewer('#board', { theme: 'dark' });
  viewer.load('/designs/project.zip', { view: '3d' }).catch(console.error);
  window.addEventListener('pagehide', () => viewer.dispose(), { once: true });
</script>

Also available as a self-contained ES module (dist/kivi-viewer.js), a code-split lite module (dist/lite/kicad-webview-lite.js), a custom element, an iframe entry (dist/embed.html), and a single-file portable HTML exporter.

Capabilities

Capability Highlights
Schematic & PCB 60 FPS pan/zoom, layer focus/presets, component/net/bus/property search, copper net highlights, worksheet previews, PCB outline view
Interactive 3D Orbit/pan, translucent stackup (setAppearance('translucent')), side-aware part focus, exploded layers, fast photoreal studio preset
Linked Views & Deep Links Cross-probe exact saved identities across schematic, PCB, 3D, and hierarchy tree; restore cameras/layers/selections from URLs
Fabrication & BoM Gerber & Excellon layer overlay and measurement, grouped BoM inspection & CSV export, hierarchy SVG export
Analysis & Interactive Demos Render WayriCAD PI/SI/thermal scalar fields with source-hash binding; add virtual LEDs, OLED/TFT displays, buttons, and knobs
Portable Export Bundle a board and viewer into one self-contained offline HTML file for Slack, Notion, email, or archives

Showcase

Photoreal 3D Board Expanded Stackup & Layer View Linked Schematic / PCB / Net Focus
Photoreal 3D board view Expanded stackup inspection Linked net focus

Use Cases

  • Product & Hardware Documentation: Embed interactive schematics, PCBs, and 3D boards directly in docs sites, datasheets, blogs, and GitHub Pages with a single <script> tag.
  • Open-Source Hardware Portfolios & Storefronts: Let visitors orbit 3D boards, toggle translucent copper stackups, inspect BoMs, and follow nets with zero backend infrastructure.
  • Interactive Tutorials & Virtual Hardware Demos: Wire virtual LEDs, OLED/TFT displays, buttons, and knobs to a live board view for interactive bring-up guides and classrooms.
  • Portable Offline Sharing (Slack / Notion / Email): Export a complete board + viewer into one self-contained HTML file, or embed WayriCAD PI/SI/thermal field overlays with source-hash verification.
  • Agentic Workflows & Real-Time Design Previews: Pair AI coding/hardware agents (Antigravity, Codex, Claude Code, Cursor) with the bundled KiCad WebView Live Preview Skill so agents stream live PCB, schematic, and 3D edits to your browser as they happen and export interactive demos on demand.

Agentic Workflows Skill (skills/kicad-webview-live-preview)

Give AI agents a live browser viewport while they place components, route traces, or edit schematics:

Live agentic KiCad WebView demo building a 10x10 mm relaxation oscillator PCB

node skills/kicad-webview-live-preview/scripts/live_preview.mjs /path/to/kicad-project --view pcb --theme dark
  • Real-time SSE reload: Watches .kicad_pcb, .kicad_sch, .kicad_pro, and Gerber/drill files and pushes live updates to KiCadWebView.Viewer on every agent write.
  • Interactive previews & demos: Switch between PCB, Schematic, and 3D in one click, or bundle a portable offline HTML demo for PRs and reviews.
  • Localhost-only & zero-dependency: Runs on 127.0.0.1 with Node.js 22+ and never uploads private designs. See skills/kicad-webview-live-preview/SKILL.md.

Performance Benchmarks (v1.2.4 WebGL2 vs. KiCanvas)

KiCad WebView v1.2.4 vs KiCanvas Pan, Zoom, Memory and Cross-Selection Benchmarks

Instanced Analytic-SDF + Stencil WebGL2 2D rendering (src/webgl2-2d.mjs) and O(1) indexed selection measured in Microsoft Edge (1600×960, deviceScaleFactor=1) via CDP over a 3-second pan + wheel-zoom sweep (requestAnimationFrame deltas):

Board Viewer / Build Cold Load Median FPS p95 / p99 Frame Jank (>33 ms) Cross-Select JS Heap
wayri/KERO (726 KB PCB) Previous baseline — 30.12 FPS 57.61 ms / — 51.96% — 105.21 MB
wayri/KERO (726 KB PCB) KiCad WebView v1.2.4 (WebGL2) 0.16 s 59.88 FPS (120.5 @120Hz) 16.80 / 17.00 ms (8.6 ms @120Hz) 0.00% 0.27 ms 10.76 MB
wayri/KERO (726 KB PCB) KiCanvas (kicanvas.org, 2D WebGL2) — 59.88 FPS 17.20 / 17.40 ms 0.00% — 9.12 MB
OLIMEX/ESP32-P4-DevKit (3.17 MB) WebGL 1.5× overscan — 59.88 FPS 156.82 / 266.69 ms 8.41% — 32.23 MB
OLIMEX/ESP32-P4-DevKit (3.17 MB) KiCad WebView v1.2.4 (WebGL2) 0.33 s 59.88 FPS (120.5 @120Hz) 16.80 / 17.00 ms 0.56% (0% @120Hz) 1.73 ms 21.45 MB
OLIMEX/ESP32-P4-DevKit (3.17 MB) KiCanvas (kicanvas.org, 2D WebGL2) — 59.88 FPS 16.80 / 16.90 ms 0.00% — 38.37 MB
BerkeleyLab/Marble (42 MB, 205k prims) Unbatched baseline — — 66.60 ms / — 22.27% — —
BerkeleyLab/Marble (42 MB, 205k prims) KiCad WebView v1.2.4 (WebGL2) 2.08 s local (8.23 s remote) 59.88 FPS (119.1 @120Hz) 16.80 / 33.30 ms 1.69% 5.10 ms 211.54 MB
BerkeleyLab/Marble (42 MB, 205k prims) KiCanvas (kicanvas.org, 2D WebGL2) 12.42 s remote 59.88 FPS 17.00 / 17.40 ms 0.00% — 152.42 MB

Measured live in Microsoft Edge CDP (1600×960, DPR 1). Instanced WebGL2 SDF + stencil zone rendering (0.5–3.0 ms median GPU draw) and O(1) R8 GPU selection masks give v1.2.4 0.00% jank on KERO, 44% lower JS heap than kicanvas.org on ESP32-P4 (21.45 MB vs 38.37 MB), 2.08 s local load (8.23 s remote vs 12.42 s KiCanvas) on the 42 MB / 205k-primitive Marble PCB, and 0.27–5.10 ms cross-selection while keeping dist/lite at 348.7 KB raw (121.3 KB gzip) and supporting interactive 3D, Gerbers/Excellon, BoM, WayriCAD overlays, and offline HTML export (details).

Feature Comparison

Capability KiCad WebView KiCanvas InteractiveHtmlBom Static SVG / PNG Exports
Embeddable JS SDK (npm + CDN + iframe) ✅ ✅ ⚠️ (standalone HTML) ✅ (static image)
Schematic + PCB + Linked cross-probing ✅ ✅ ⚠️ (PCB + BoM) ❌
Interactive 3D board & translucent stackup ✅ ❌ ❌ ❌
Gerber & Excellon fabrication viewer ✅ ❌ ❌ ❌
Interactive BoM & CSV export ✅ ❌ ✅ ❌
Analysis field overlays & virtual UI controls ✅ ❌ ❌ ❌
Single-file portable offline HTML export ✅ ❌ ✅ ⚠️ (non-interactive)
Stable programmatic Embed API (v1.0) ✅ ⚠️ (web component) ❌ ❌
License MPL-2.0 MIT MIT N/A

Each tool fits a distinct need: KiCanvas is a clean, minimal MIT-licensed web component; InteractiveHtmlBom is purpose-built for assembly stations; KiCad WebView focuses on full-stack embeddable 2D/3D/Gerber/BoM/analysis web applications.

Build & Verify Locally

Requires Node.js 22+ for development (visitors need no Node.js):

npm ci && npm run build:3d && npm run build && npm test && npm run preview

Scope, Docs & License

About

KiCad WebView is a self-hosted JavaScript SDK to embed interactive KiCad schematics, PCB layouts, 3D boards, and Gerbers on websites and in documentation. MPL-2.0.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages