Documentation Index
Fetch the complete documentation index at: https://mintlify.com/devhammed/react-gtk/llms.txt
Use this file to discover all available pages before exploring further.
What is React GTK?
React GTK is a React renderer for building GTK+ desktop applications using JavaScript/GJS. It brings the power of React’s declarative UI paradigm to the GTK platform, allowing you to build native desktop applications using familiar React patterns.Quick example
Why React GTK?
React GTK combines the best of both worlds: React’s component model and GTK’s native desktop capabilities.Declarative UI
Write your GTK applications using JSX and React components. The renderer handles the imperative GTK API for you.
Native performance
Your apps run natively with GTK 4.0, providing excellent performance and native platform integration.
React ecosystem
Use React hooks, state management, and familiar patterns from the React ecosystem.
TypeScript support
Full TypeScript support with complete type definitions for all GTK widgets and APIs.
Key features
React GTK provides everything you need to build production-ready GTK desktop applications:React reconciler for GTK+ 4.0
React reconciler for GTK+ 4.0
Built on top of React’s reconciler, React GTK efficiently updates the GTK widget tree based on your component changes. Only the widgets that need to update are modified, ensuring optimal performance.
Built-in GTK widgets as React components
Built-in GTK widgets as React components
All common GTK widgets are available as React components:
GtkWindow- Application windowsGtkBox- Layout containersGtkButton- Interactive buttonsGtkLabel- Text labelsGtkEntry- Text input fieldsGtkStack- Stackable page containers- And more…
Event handling and refs support
Event handling and refs support
Handle GTK signals using familiar React patterns:Access GTK widget instances directly using refs:
Multi-window applications
Multi-window applications
Create complex applications with multiple windows and modal dialogs:
Text formatting with Pango attributes
Text formatting with Pango attributes
Apply rich text formatting to labels and entries using Pango attributes:
GJS/GNOME JavaScript runtime integration
GJS/GNOME JavaScript runtime integration
Seamlessly integrates with the GJS runtime and GNOME platform, giving you access to the full GNOME stack.
How it works
React GTK uses a custom React reconciler to bridge React components to GTK widgets:React reconciler processes changes
React’s reconciler determines what changed in your component tree.
GTK widgets are updated
The React GTK renderer creates and updates actual GTK widgets based on the React component tree.
Platform requirements
To use React GTK, you need:- GJS runtime - GNOME JavaScript bindings (GJS)
- GTK 4.0 - The GTK toolkit version 4.0 or later
- React 18.x - React version 18.0 or higher
- Node.js - For building your application with bundlers like Parcel
React GTK targets the GNOME/GTK platform. Your applications will run on Linux systems with GTK 4.0 installed.
Next steps
Installation
Install React GTK and set up your development environment
Quickstart
Build your first React GTK application
Core concepts
Learn how React GTK renders components
API reference
Explore the complete API documentation
