Skip to content

gtkx-org/gtkx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,076 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GTKX

GTKX

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.

npm version CI Documentation License GitHub Discussions


A GTKX-built editor saves a style edit and Vite Fast Refresh repaints the running app

▶ Watch in HD on gtkx.dev


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.

Features

  • 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.

Prerequisites

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.0 location, or any directory pointed at by pkg-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.

Quick start

npx @gtkx/cli@latest create my-app
cd my-app
npm run dev

Examples

Explore 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

Documentation

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.

Contributing

Contributions are welcome! Please see the contributing guidelines.

Community

License

MPL-2.0

About

Native Linux application development for the modern age — React 19 + GTK4/Libadwaita on Node.js

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors