Skip to content

winpane

Windows overlay SDK: HUDs, interactive panels, PiP thumbnails, tray icons. High-perf Rust core with bindings for TypeScript, C, Python, Go, Zig, and any language via JSON-RPC.

Release CI Docs DeepWiki License: MIT

winpane overlays floating over VS Code

Examples are draggable, remember their position, and default to the bottom-right corner. Most support --no-titlebar, --position X,Y, --monitor N, and more — run any example with --help to see its flags.

Terminal window
cargo run -p winpane --example clock_overlay
cargo run -p winpane --example countdown_timer
cargo run -p winpane --example system_monitor -- --no-titlebar
cargo run -p winpane --example stock_ticker -- --monitor 1
cargo run -p winpane --example glucose_monitor -- --demo --unit mmol --no-titlebar
cargo run -p winpane --example capture_excluded -- --position 100,100
# see all flags for any example
cargo run -p winpane --example clock_overlay -- --help

pip_viewer and anchored_companion look for an open Notepad or Calculator window. All examples run without configuration — network-dependent ones fall back to simulated data.

All examples
ExampleWhat it does
clock_overlayLive desktop clock, updates every second
glucose_monitorCGM overlay — polls Nightscout or uses simulated data
stock_tickerStock prices with live/simulated data
countdown_timerInteractive timer with Start/Reset buttons
system_monitorReal CPU and memory usage
color_pickerPixel color under cursor, updated live
sticky_notesFloating notes, toggled via tray icon
interactive_panelClickable buttons, hover effects, drag
tray_tickerSystem tray icon with popup panel
pip_viewerLive thumbnail of another window
anchored_companionPanel that follows another window
hud_demoBasic stats overlay
backdrop_demoMica / Acrylic backdrop effects (Win11)
fade_demoFade-in / fade-out animations
capture_excludedOverlay hidden from screen capture
custom_drawProcedural D2D drawing

Run any Rust example: cargo run -p winpane --example <name>. Some examples may be buggy, please report issues, contributions welcome!

examples/typescript/: clock_overlay.ts, glucose_monitor.ts, pomodoro.ts, sticky_notes.ts, stock_ticker.ts

Run: npx tsx examples/typescript/<name>.ts (requires addon built; see TypeScript guide)

examples/python/: clock_overlay.py, glucose_monitor.py, hud_demo.py

Run: python examples/python/<name>.py (requires winpane-host built; see Python guide)

examples/node/: backdrop_demo.js, hud_demo.js, interactive_panel.js

Run: node examples/node/<name>.js (requires addon built; see Node.js guide)

examples/c/: custom_draw.c, hello_hud.c

See build.bat or CMakeLists.txt for build instructions.

  • Transparent always-on-top windows via DirectComposition — no GDI, no process injection
  • GPU-accelerated rendering: D3D11 → DXGI swap chain → D2D device context → DirectComposition visual
  • Retained-mode scene graph — add rects, text, images; winpane handles the draw loop
  • Multi-language: Rust API, Node.js addon (napi-rs), C ABI (cbindgen), JSON-RPC CLI for Python/Go/Zig/anything
  • Built-in DPI awareness, capture exclusion, Mica/Acrylic backdrops, fade animations, system tray, drag, hit testing

Not a UI framework. No layout engine, no CSS, no widgets. You position elements with x/y coordinates.

Not cross-platform. Windows only, by design. Uses DirectComposition, which has no equivalent on other operating systems.

Not a game render-loop hook. DirectComposition composites outside the game process, adding 1–3 ms. Fine for MMO dashboards, strategy game tools, or any overlay where a couple of milliseconds don’t matter. Competitive twitch shooters that need sub-frame precision typically inject into the render pipeline instead.

TypeBehaviorUse case
HudClick-through, topmost, no taskbar entryStats overlays, notifications, timers
PanelInteractive — hit testing, click/hover events, dragTool palettes, floating controls, popups
PipLive DWM thumbnail of another windowPreview panels, reference windows
TraySystem tray icon with popup panel and context menuBackground app controls, status indicators

These compose together — a tray icon can toggle a panel, a panel can anchor to another window, any surface can fade and exclude itself from screenshots.

Terminal window
cargo add winpane
Terminal window
npm install winpane

Or build from source.

Link against winpane_ffi.dll and include winpane.h (generated by cbindgen). Build the DLL:

Terminal window
cargo build -p winpane-ffi --release

Spawn the winpane-host CLI binary, talk JSON-RPC 2.0 over stdin/stdout. Build:

Terminal window
cargo build -p winpane-host --release
import { WinPane } from "winpane";
const wp = new WinPane();
const hud = wp.createHud({ width: 300, height: 100, x: 100, y: 100 });
wp.setRect(hud, "bg", {
x: 0, y: 0, width: 300, height: 100,
fill: "#14141ec8", cornerRadius: 8,
});
wp.setText(hud, "msg", {
text: "Hello from winpane",
x: 16, y: 16, fontSize: 18,
});
wp.show(hud);

This creates a transparent, click-through overlay at (100, 100) with a rounded dark background and white text. The surface stays on top of all windows, invisible to screen capture if you want it to be.

If building from source, see the TypeScript guide.

  • Windows 10 version 1903 or later
  • Windows 11 22H2+ for backdrop effects (Mica, Acrylic)
  • Windows 10 2004+ for capture exclusion

Pre-1.0. The API works and examples run, but expect breaking changes. Bug reports and feedback welcome.

I was diagnosed with Type 1 diabetes in 2025. Most CGM apps are geolocked and unavailable in Kenya, so I built mysukari.com — a free platform that connects any CGM via Nightscout for reporting (view my dashboard) and analysis. I wanted a small desktop overlay showing my glucose reading and trend arrow, updating every few minutes, hidden from screen shares. Nothing lightweight and multi-language existed, so I built winpane.

I had no prior experience with DirectComposition, Direct2D, or Win32 GPU rendering. GitHub Copilot with Claude Opus 4.6 was instrumental in building this.

MIT