Reactive desktop UIs in Go. Rendered on the GPU.
No CGO. No WebView. Yes, GPU.
Powered by ggfx, a fork of Ebitengine.
Demos · Quick start · Examples · Guide · Accessibility · Development · License
ggui is a cross-platform GUI framework for Go. It brings together Flutter-inspired widget trees and layout, Svelte-style reactivity, and GPU rendering through ggfx. Build your interface in Go with composable widgets, reactive state, and controls that bind directly to your data.
Important
Early development: APIs are working but subject to change. Native accessibility support covers macOS and Windows; the Windows bridge is new and not yet verified on hardware.
| Feature | What you get |
|---|---|
| Reactive state | State, lazy derived values, effects, and cancellable resources. |
| Composable layouts | Rows, columns, flex, grids, stacks, scrolling, and virtualized keyed lists. |
| Ready-made controls | Buttons, text fields, tables, tabs, dialogs, command search, charts, chat components with Markdown, and more. |
| Text and input | IME composition, grapheme-aware editing, clipboard support, and font fallbacks. |
| Motion and themes | Tweens, springs, transitions, light/dark themes, and inherited style tokens. |
| The desktop | Several windows that reopen where they were closed, app menus, a tray icon, native file and message dialogs, desktop notifications with buttons, and one running instance. |
| Your language | Every word the controls say by themselves replaced in one place, right-to-left layout, and Korean, Japanese and Chinese input. |
| Developer tools | The ggui command for live rebuilds and release bundles, headless interaction tests with Probe, and an in-app widget inspector. |
| Shipping | Bundles for macOS, Windows and Linux (.app, .exe, .deb, .rpm) built from any system, macOS signing and notarizing from a Mac, Linux or Windows, and one command that publishes a GitHub release, a Homebrew cask and a Chocolatey package. |
| Showing it off | Scripted tours recorded to an animated GIF offscreen, in a macOS window frame with a cursor that moves and clicks. |
Todo — add tasks, mark them complete, and switch themes.
Component gallery — explore reactive controls, search components, and try animated notifications with undo actions.
Recorded from the running macOS examples, driven through the native accessibility
API. The demo builds use AccessibilityAlways.
The quickest way in is the ggui command, which creates an app, runs it
with live rebuilds, and bundles it for release. Install it one of three ways:
| With | Run |
|---|---|
| Homebrew (macOS, Linux) | brew install ironpark/tap/ggui |
| Go | go install github.com/ironpark/ggui/cmd/ggui@latest |
| A download | The archive for your system from the releases, named ggui command: macOS, Linux and Windows, Intel and ARM. Put ggui on your PATH. |
To use the library without the command, add it to your module:
go get github.com/ironpark/ggui@latestRequires Go 1.27+ for generic methods in the reactive API; the command
builds your app with the go on your PATH.
ggui, ggfx, and ggwd use no CGO or WebView — they call system libraries via
purego/dlopen, so no C compiler or development headers are needed to build.
At runtime, Linux needs an X11 or XWayland display with libX11 and OpenGL 3.3
or OpenGL ES 3.0, Windows uses Direct3D 11 or OpenGL 3.3, and macOS 13+ uses
system frameworks. ggui doctor checks a machine for all of this and says what
is missing.
The library and the command are versioned apart: the library as vX.Y.Z,
the command as cmd/ggui/vX.Y.Z. ggui init requires the latest library
release in the app it creates.
ggui init hello && cd hello
ggui devggui init writes a module with a counter to start from and a ggui.toml
holding every setting. ggui dev runs it, and rebuilds and restarts it
each time you save; state marked with Keep survives the restart, so you
stay on the screen you were working on.
| Command | Does |
|---|---|
ggui init [dir] |
Create a new application. |
ggui dev |
Run it, rebuilding and restarting as you edit; --web serves it to a browser. |
ggui build |
Bundle a release: a signed .app, disk image or installer for macOS, an .exe with its icon and version for Windows, an install tree, .tar.gz, .deb and .rpm for Linux, or a web bundle. --target picks one, from any system. |
ggui release |
Build every target and publish them: a GitHub release, a Homebrew cask in your tap, a Chocolatey package. --dry-run shows what it would do. |
ggui record |
Run the app's scripted tour offscreen and save it as an animated GIF. |
ggui i18n check |
Find the app's messages without a translation, and translations that no longer fit them. |
ggui doctor |
Check the machine and the project for what ggui needs. |
See the ggui command for every flag and ggui.toml.
Save this as main.go in a module that requires ggui:
package main
import (
"log"
"github.com/ironpark/ggui"
"github.com/ironpark/ggui/ui"
"github.com/ironpark/ggui/widget"
)
func main() {
count := ggui.State(0)
app := ggui.New(ggui.Config{
Title: "Hello, ggui",
Width: 480,
Height: 320,
}, func() ggui.Widget {
return widget.Center(
widget.Column(
widget.Textf("Count: %d", count),
ui.Button("Increment", func() { ggui.Add(count, 1) }),
).Gap(12).Align(widget.AlignCenter),
)
})
if err := app.Run(); err != nil {
log.Fatal(err)
}
}go run .State holds the count, Textf follows it, and the button updates it.
No manual refresh or subscription wiring is needed.
Run these commands from a checkout of this repository. The Task commands build and launch macOS app bundles.
| Example | Explore | Run on macOS |
|---|---|---|
| Counter | Reactive state, buttons, shortcuts, and theme switching. | task run |
| Todo | IME text input, validation, keyed lists with inline editing, transitions, an empty state and an AlertDialog. | task run-todo |
| Settings | One struct in one signal, Field lenses, a derived dirty flag, Styled text and a worker that posts its result back. | go run ./docs/examples/settings |
| Router | Nested persistent layouts, path parameters, redirects, scoped not-found screens, and history navigation. | go run ./docs/examples/router |
| Custom widgets | A dial built on Interactive with a Spring, a disclosure that calls Invalidate, and a 5,000-row virtualized list. | go run ./docs/examples/custom |
| Charts | All 70 shadcn chart examples, interactive tooltips, themes and animation replay. | go run ./docs/examples/charts |
| Carousel & Input OTP | Swipeable carousels and segmented code inputs, all shadcn variants and state previews. | go run ./docs/examples/controls |
| Windows | Several windows over one signal, window state as signals, native menus and a tray icon that follow the system's dark mode. | go run ./docs/examples/windows |
| Files | Files dropped from the desktop and the native Open, Save and folder dialogs reached through Host.Dialogs. |
go run ./docs/examples/files |
| Workspace | A project dashboard combining searchable tables, form lenses, live options, dialogs, charts, animated progress, toasts, and theme switching. | task run-workspace |
| SQLite | A SQLite client with table browsing, filters, paging, typed edits, row creation/deletion, cancellable SQL, and CSV export. | go run ./docs/examples/sqlite |
| Gallery | Searchable previews across Inputs, Navigation, Feedback, Layout, and Data, with a theme customizer for style, radius, menu colors and light, dark or system mode. | task run-gallery |
| Create | Live theme editor with interactive card previews, independent palettes, typography, radius, preset import/export and Go code. | task run-create |
Browse All examples for the complete catalog and
headless test commands. On other platforms, use go run ./docs/examples/counter,
go run ./docs/examples/todo, or go run ./docs/examples/gallery. The gallery
adapts from two columns to one in narrow windows and keeps search, theme
controls, and the command launcher visible while scrolling.
The counter tests show how to drive the same UI
headlessly with a Probe.
- Model state with signals.
State,Derived, andCombinekeep data and computed values in sync. - Compose a widget tree. Constructors describe the content; chainable setters configure layout and appearance.
- Bind controls to state. A control updates its binding, and changes to the binding update the control.
- Scope reactive updates.
Component,If,EachKeyed, andAwaitlet parts of the interface update independently.
The core ggui package provides the app and its windows, reactivity,
rendering, input, and the widget protocol. The widget package holds the
unstyled building blocks written on it: text, rows, columns, stacks,
scrolling, lists, popups, and transitions. The ui package adds themed
controls built on both public APIs (alongside its focused subpackages
ui/theme, ui/icons, ui/chart, and ui/chat), which you can also use to
build your own controls. Optional top-level packages add page and layout
routing (router), application localization (i18n), and scripted offscreen
recording (record).
Native accessibility support covers macOS and Windows: the macOS bridge speaks to VoiceOver and the other Cocoa assistive tools, and the Windows bridge is a UI Automation provider, which Windows also bridges to the older MSAA clients. A Linux bridge is not yet implemented. The Windows bridge is new and has not yet been exercised on Windows hardware.
The default AccessibilityAuto mode activates the bridge when assistive
technology attaches. Set Config.Accessibility to AccessibilityAlways for
tools such as Accessibility Inspector, or AccessibilityOff to disable it.
Widgets also provide keyboard navigation, focus handling, semantic roles and labels, text scaling, and reduced-motion settings. See the guide's input section and styling and themes.
Start with the documentation index for a guided reading path and the full topic list.
task # fmt + vet + test
task check # fmt + cross-platform vet + staticcheck (pre-push check)
task build # build all packages
task run # bundle and launch the counter example (macOS)
task run-todo
task run-gallery
task bundle EXAMPLE=gallery # build the .app without launching
task serve-gallery # the gallery in a browser, reloading on change
task cleanThese commands use Task v3 (brew install go-task). On macOS, the run tasks
build bin/ggui-<example>.app with ggui build,
then launch it with open -n. Each launch starts a new instance using the rebuilt
binary. The bundles are local development builds; they are not distribution-signed
or notarized. task build, task test, and the other Go maintenance tasks also
work on other platforms; run examples there with go run ./docs/examples/<example>.
Override the Go executable with task build GO=/path/to/go when needed.
See Development for all commands, browser/WASM examples, debug builds, visual checks, and the repository map.
ggui is licensed under the Apache License 2.0. The code, fonts, theme palettes, and icon sets it bundles from other projects keep their own licenses, in the directories that hold them: the text engines under internal/third_party, the fonts under fonts, the bundled and full icon sets under ui/icons and icons, and the vendored theme palettes under ui/theme.