Build serious applications for desktop, mobile, and web — from a single Go codebase. No HTML. No CSS. No JavaScript. No hidden browser.
macOS · Windows · Linux · iOS · Android · Web One Go module. Six platforms.
Most cross-platform GUI frameworks make you choose between simplicity and capability. go-gui doesn't. Write the UI as ordinary Go. Keep application state in Go. Render directly to the GPU.
package main
import (
"fmt"
"github.com/go-gui-org/go-gui/gui"
"github.com/go-gui-org/go-gui/gui/backend"
)
type App struct {
Clicks int
}
func main() {
gui.SetTheme(gui.ThemeDark.WithBorders(true))
w := gui.NewWindow(gui.WindowCfg{
State: &App{},
Title: "Get Started",
Width: 300,
Height: 300,
OnInit: func(w *gui.Window) {
w.UpdateView(mainView)
},
})
backend.Run(w)
}
func mainView(w *gui.Window) gui.View {
app := gui.State[App](w)
return gui.Column(gui.ContainerCfg{
Sizing: gui.FillFill,
HAlign: gui.HAlignCenter,
VAlign: gui.VAlignMiddle,
Content: []gui.View{
gui.Text(gui.TextCfg{
Text: fmt.Sprintf("%d Clicks", app.Clicks),
TextStyle: gui.CurrentTheme().B1,
}),
gui.Button(gui.ButtonCfg{
ID: "gs_counter",
Content: []gui.View{
gui.Text(gui.TextCfg{
Text: "Click Me",
}),
},
OnClick: func(ctx gui.EventCtx) {
gui.State[App](ctx.Window).Clicks++
},
}),
},
})
}
The framework handles layout, rendering, input, and state. You write the application.
go-gui renders your application directly through native GPU backends. Your application stays in Go from the event loop to the pixels.
Your Go application
│
▼
┌─────────┐
│ go-gui │
└────┬────┘
│
GPU rendering
│
┌─────────────┼─────────────┐
▼ ▼ ▼
Metal OpenGL WebGPU
Your UI is not a web page.
Application logic stays in Go.
Desktop apps render natively — Metal on macOS, cgo-free OpenGL on Windows and Linux, Metal on iOS, WebGPU in the browser.
Six focused libraries, one rendering pipeline. Each library is usable on its own — together they cover the things a real application needs. Examples ship in the repo; larger applications live in the org.
Multi-cursor editing, piece-table undo, syntax highlighting, search with regex, code folding, and a diagnostics API for inline error markers. Embed it in any go-gui window — same rendering system as the rest of your application.
18+ chart types — line, bar, area, pie, scatter, candlestick — with incremental updates for real-time dashboards. Zoom, pan, and brush select out of the box.
Hello · مرحبا · 日本語 · 中文 · Ελληνικά
Complex scripts, bidirectional text, grapheme clusters, and font fallback. A serious GUI needs serious text — go-glyph delivers browser-quality rendering without a browser.
Tiled raster and vector maps with projection handling. OSM and WMS tile sources, kinetic pan and zoom, markers and geospatial overlays.
A full terminal emulator as a widget. Spawns a real shell over a PTY, renders through a GPU-accelerated draw canvas, works on macOS, Linux, and Windows.
50+ widgets, from buttons to DataGrid to DockLayout. A theme system, an animation subsystem, and custom GPU shaders — every widget built on the same config-struct pattern and event model.
Buttons, inputs, tables, trees, menus, dialogs, docks — every widget follows the same config-struct pattern and event model. The gallery below is real, running live in the showcase.
The widget gallery — run it yourself in the browser showcase.
Continuously rendered. No virtualization. No special cases.
The benchmark window shows live per-frame numbers — FPS and view/layout/render times in µs — at 10 to 5,000 buttons, labels, toggles, and mixed widgets. The numbers above are real, measured in the window on your machine.
Not another button-and-label toolkit.
Multi-pass constraint layout: rows, columns, wrapping, splitters, docking with drag-and-drop panels.
DataGrid with virtual rows, multi-column sort, per-column filters, inline editing, and CSV/TSV/XLSX/PDF export.
Complex-script shaping, bidirectional text, font fallback, rich text — browser-quality, without a browser.
ARIA roles, IME, AT-SPI on Linux, NSAccessibility on macOS. Built into the core, not bolted on.
Layout inspector. Time-travel: scrub backward through application state frame by frame.
Run the UI headlessly. No display server required.
go-gui uses an immediate-style programming model without the limitations usually associated with immediate-mode GUIs.
Views are produced by ordinary Go functions. No template language, no JSX, no bridge.
Widgets carry IDs; focus, scrolling, and state persist where it matters, frame after frame.
One typed state slot per window. gui.State[T] gives the
application explicit control over its data.
The result is a framework that stays simple as your application gets complicated.
Same application. Same widgets. Same layout system. Different GPU backends, same code.
MIT licensed · Open source · Latest release on GitHub
Real applications. Real code. Click through to the source.