react-native-gtkx
v0.4.0
Published
React Native components and APIs for Linux desktop, rendered as native GTK4 widgets via gtkx
Maintainers
Readme
Under the hood: gtkx (a React reconciler for GTK4, with an in-process FFI into libgtk) and Yoga — the same flexbox engine React Native itself uses. Navigation runs on real Adwaita widgets: react-navigation's stack and drawer are backed by an actual Adw.NavigationView/Adw.NavigationSplitView, so the back button, the slide transition, Escape, the back gesture and the back-history menu are the platform's, not a JS re-implementation. Past the portable surface, react-native-gtkx/gtk and /adw hand you every GTK/Adwaita widget directly — including a navigation stack that needs no router at all.
And the portability proof — examples/profile renders ONE source file with both renderers, not a single @gtkx/* import in it:
Quickstart
npx degit itsmepetrov/react-native-gtkx/template my-app && cd my-app
npm install && npm run dev # a window, with Fast RefreshAdding Linux to an app that already ships iOS/Android is npm install react-native-gtkx, a one-line Metro config wrap, and npx react-native run-linux — see installation.
Documentation
The full docs, including screenshots per component and a searchable reference, are published at itsmepetrov.github.io/react-native-gtkx (source in this repo's docs/ tree):
- Guide — installation, your first app, Metro vs. vite toolchains, the plain-GTK profile, packaging (debs, standalone).
- Reference — every component and API, each with its GTK/Adw badge and its differences from React Native.
- Architecture — overview (the reconciler-to-gtkx path, the widget surface), layout and styling (the Yoga shadow tree, the style split), gestures, and window/navigation/settings integration.
- gtkx upstream agenda — the standing agenda for gtkx itself.
- CONTRIBUTING — developing the library from macOS, via a Linux VM.
Requirements
Linux, GTK4 ≥ 4.20, libadwaita ≥ 1.8, Node.js ≥ 24.
License
MIT
