# NodeGUI — Build Native Desktop Apps with JavaScript and Qt > A JavaScript and TypeScript library for building performant native desktop applications using Qt widgets, offering a lightweight alternative to Electron without bundling a browser engine. ## Install Save in your project root: # NodeGUI — Build Native Desktop Apps with JavaScript and Qt ## Quick Use ```bash npx @nodegui/create-nodegui my-app cd my-app npm install npm start ``` ## Introduction NodeGUI lets you build truly native desktop applications using JavaScript or TypeScript without shipping a bundled browser. Instead of rendering HTML in Chromium like Electron does, NodeGUI uses Qt under the hood to create real native widgets, resulting in significantly lower memory usage and smaller application size. ## What NodeGUI Does - Renders native OS widgets through Qt instead of web-based rendering - Provides a Node.js-compatible runtime with access to the full npm ecosystem - Supports styling via a CSS-like syntax that maps to Qt stylesheets - Offers React NodeGUI for developers who prefer a React component model - Produces executables for Windows, macOS, and Linux from a single codebase ## Architecture Overview NodeGUI wraps the Qt framework via native C++ bindings exposed to Node.js through N-API. The JavaScript runtime controls widget creation, layout, event handling, and styling. Unlike Electron, there is no browser process or DOM; the UI is composed of actual Qt widgets rendered by the operating system. This architecture eliminates the memory overhead of running a Chromium instance per window. ## Self-Hosting & Configuration - Create a new project with the official starter template via npx - Install platform-specific Qt dependencies automatically through npm postinstall - Configure application metadata, icons, and packaging in package.json - Use @nodegui/packer to bundle the app into distributable binaries - React NodeGUI is available as a separate package for component-based development ## Key Features - Memory footprint as low as 20-30 MB compared to Electron's 100 MB+ baseline - Application binaries around 30 MB versus Electron's 150 MB+ minimum - Full access to Node.js APIs including filesystem, networking, and child processes - Event-driven programming model familiar to web developers - Qt's mature accessibility and internationalization support built in ## Comparison with Similar Tools - **Electron** is more mature with a larger ecosystem but consumes significantly more memory and disk - **Tauri** uses the system webview and Rust; NodeGUI uses Qt and stays within the Node.js ecosystem - **NW.js** also bundles Chromium like Electron; NodeGUI avoids a browser engine entirely - **Wails** targets Go developers; NodeGUI is JavaScript and TypeScript native - **Dear ImGui** is immediate-mode and low-level; NodeGUI provides high-level widget abstractions ## FAQ **Q: Can I use existing npm packages with NodeGUI?** A: Yes. NodeGUI runs on Node.js, so any pure JavaScript npm package and most native modules work without modification. **Q: Does NodeGUI support React?** A: Yes. React NodeGUI provides a React reconciler for Qt widgets, letting you use JSX, hooks, and component composition. **Q: How mature is NodeGUI for production use?** A: NodeGUI is suitable for internal tools and smaller applications. The widget set covers common UI patterns, though some advanced Qt features are not yet exposed. **Q: What platforms are supported?** A: Windows, macOS, and Linux are supported. The Qt backend ensures consistent native look and feel on each platform. ## Sources - https://github.com/nodegui/nodegui - https://docs.nodegui.org --- Source: https://tokrepo.com/en/workflows/asset-2d88d76b Author: AI Open Source