Package Exports
- wndkit
- wndkit/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wndkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
WndKit
Native Windows desktop apps in Node.js. No bloat. Just Win32 APIs.
const { Window, Button, Label, Application } = require("wndkit");
const win = new Window("Hello", 400, 200);
const label = new Label(win, "Click the button", 50, 50, 300, 30);
const button = new Button(win, "Click Me", 150, 100, 100, 30);
button.on("click", () => (label.text = "Clicked!"));
win.show();
Application.run();
Requirements:
- Windows 10/11
- Node.js 20+
Works out of the box on x64. Other architectures compile automatically on install.
Window
const win = new Window(title, width, height);
win.title = "New Title"; // read/write
win.size = { width, height }; // read/write
win.position = { x, y }; // read/write
win.show();
win.hide();
win.on("close", callback);
Button
const btn = new Button(parent, text, x, y, width, height);
btn.text = "New Text"; // read/write
btn.on("click", callback);
Label
const lbl = new Label(parent, text, x, y, width, height);
lbl.text = "New Text"; // read/write
TextBox
const txt = new TextBox(parent, text, x, y, width, height);
txt.text = "Hello"; // read/write
txt.multiline = true; // read/write
CheckBox
const chk = new CheckBox(parent, text, x, y, width, height);
chk.checked = true; // read/write
chk.on("click", callback);
Application
Application.run(); // Start message loop (required)
License
MIT