ui
Platform-native GUI library for Go.
A Go library for building desktop apps with native-looking windows and controls on Windows, Mac, and Linux, wrapping the C library libui, currently mid-alpha and best suited for small programs and experiments.
This is a Go library for building desktop applications with native-looking user interfaces. Go is a programming language made by Google. A native GUI means the windows, buttons, and controls your app shows will look and behave like they belong on whichever operating system the user is running, whether that is Windows, Mac, or Linux, rather than rendering a custom look from scratch.
The library is a Go wrapper around a separate C library called libui, written by the same author. On Windows it uses the platform's built-in controls going back to Vista. On Mac it requires macOS 10.8 or newer. On Linux and other Unix-like systems it relies on GTK+ 3.10 or newer, which you install through your package manager before using the library.
The project self-describes as mid-alpha software, meaning it is not finished and not ready for production use in large or complex applications. Some parts work stably enough for small programs and the included examples, but many features are incomplete, some behavior is buggy on specific platforms, and the API is still changing. The README points to the libui project for more detail on the current state.
Installing it in a Go project is a single command once the platform dependencies are in place. On Windows there is one extra setup step: the library requires a Windows manifest file that enables a specific version of the system's control rendering library. The README explains how to embed one using a provided subpackage, or how to supply your own.
A handful of working example programs are included in the repository and can be built individually as a starting point for learning the API.
Where it fits
- Build a small cross-platform desktop tool in Go that uses real OS controls instead of rendering a web browser.
- Prototype a simple GUI utility that runs natively on Windows, Mac, and Linux from a single codebase.