Native Linux application development for the modern age
React 19 + TypeScript render to real GTK4 and Libadwaita widgets on Node.js. No Electron, no WebView.
GTKX is a framework for building native Linux applications with React and GTK. A custom React reconciler renders your components to real GObject widgets, TypeScript bindings for the whole GTK4/GLib platform are generated from GObject Introspection, and everything runs on vanilla Node.js — so the npm ecosystem and the GNOME platform meet in one app.
- React 19, exactly — Hooks, Suspense, and concurrent rendering. A custom reconciler turns the component model you already know into real GTK4 widgets.
- Native, not embedded — No Chromium, no WebView, no second runtime. A Rust napi-rs module binds vanilla Node.js straight to GTK through libffi.
- All of GTK4 and Libadwaita — Every class, signal, and property, generated from GObject Introspection with full TypeScript types. The GNOME look and feel out of the box.
- CSS-in-JS for GTK — Emotion-style tagged templates compile to GTK CSS. Nesting, prop interpolation, and global styles.
- Tests that touch real widgets — A Testing Library-style API and a Vitest plugin drive real GTK under Xvfb. Query by accessible role, click, type, assert.
- Built for AI agents — A built-in MCP server exposes the live widget tree: agents inspect, click, type, fire signals, and screenshot your running app.
GTKX targets the Linux desktop and reads native GTK libraries at runtime. Before you start, make sure the toolchain is in place:
- GTK 4.22+ and its development files, available on the system
- GObject-Introspection with the GIR XML installed (the standard
/usr/share/gir-1.0location, or any directory pointed at bypkg-config --variable=girdir gobject-introspection-1.0); codegen reads these GIR files to generate the TypeScript bindings - Node.js >= 24
The getting-started guide lists the exact packages per distribution.
npx @gtkx/cli@latest create my-app
cd my-app
npm run devExplore complete applications in the examples/ directory:
- hello-world — Minimal application showing a counter
- gtk-demo — Full replica of the official GTK demo app
- tutorial — Notes app from the tutorial with GSettings and Adwaita
- browser — Simple browser using WebKitWebView
Visit https://gtkx.dev for the full documentation: the tutorial builds a complete GNOME Notes app, the widget gallery shows real captures of the components next to their source, and the API reference covers every package.
Contributions are welcome! Please see the contributing guidelines.
- GitHub Discussions — Questions, ideas, and general discussion
- Issue Tracker — Bug reports and feature requests