Hybrid immediate-mode framework — no virtual DOM, no diffing. GPU-accelerated via Metal, OpenGL, and WebGPU. 50+ widgets, 6 companion libraries.
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() {
w := gui.NewWindow(gui.WindowCfg{
State: &App{},
Title: "Counter",
Width: 300,
Height: 150,
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{
Content: []gui.View{
gui.Text(gui.TextCfg{Text: fmt.Sprintf("%d Clicks", app.Clicks)}),
gui.Button(gui.ButtonCfg{
ID: "counter",
Content: []gui.View{
gui.Text(gui.TextCfg{Text: "Click Me"}),
},
OnClick: func(_ *gui.Layout, e *gui.Event, w *gui.Window) {
gui.State[App](w).Clicks++
e.IsHandled = true
},
}),
},
})
}
One Go module → native app on macOS, Windows, Linux, iOS, Android, and the browser.
go get github.com/go-gui-org/go-gui
Pre-built showcase binaries — download and run, no installation required
Showcase contains the framework documentation. Every widget demo has a button in the upper-right corner that displays documentation about the widget.
GPU-native Go GUIs — no browser, no JavaScript, no DOM
Most GUI frameworks in Go wrap a web view — your UI runs in a hidden browser. go-gui is different. Write your UI in pure Go, render it with native GPU acceleration. Your data stays in Go structs; your UI stays in Go code. No HTML, no CSS, no JavaScript bridge.
The second thesis: a GUI toolkit should be an ecosystem of composable libraries, not a monolith. go-glyph handles text. go-charts handles data. go-edit handles code. Each library is focused and usable on its own — all sharing the same rendering pipeline.
Six libraries — each focused on one job, all built on go-gui core
Core framework — widgets, constraint layout, event system, GPU-accelerated retained-mode scene graph.
Browser-quality text rendering — BiDi, multi-grapheme clusters, complex scripts — plus vector icons and glyph rasterization.
Declarative charting — line, bar, area, pie, scatter, candlestick — incremental updates for real-time dashboards.
Text editing — single-line to multi-cursor code editor, piece-table undo, syntax highlighting, completion hooks.
Tiled raster/vector map widget with projection handling, markers, and geospatial overlays.
Embeddable terminal emulator — PTY, ANSI/VT parser, render surface as a go-gui widget.
Deep capabilities across rendering, widgets, text, and developer tooling
Metal on macOS. OpenGL on Linux and Windows. WebGPU in the browser. Every frame, a single pass sizes, positions, and renders the entire widget tree — no virtual DOM, no diffing overhead, no hidden layout passes.
Custom GPU shaders for rounded-rect clip masking, box shadows, blur effects, and color-filter post-processing. Animations run on the framework clock and integrate with the layout pass.
Hundreds of simultaneous animations, each updating independently — each composited widget managing its own state. Keyframe, spring, tween, and hero transitions. Animations run on the framework clock and integrate with the layout pass.
The spinners demo: every spinner is a standard widget with its own animation timeline. No pre-rendered sprites — each frame the pipeline sizes, positions, and renders the full tree.
Buttons, inputs, sliders, tables, trees, tabs, menus, dialogs, toasts, breadcrumbs — every widget follows the same config-struct pattern. DataGrid with built-in virtualization, sorting, grouping, inline editing, and CSV/TSV/XLSX/PDF export.
IDE-style DockLayout with drag-and-drop panel rearrangement. Canvas and DrawCanvas for custom rendering. Sidebar, CommandPalette, Form with validation — all widgets share the same config-struct pattern and event model.
Full Unicode support with bidirectional text, complex script shaping, and multi-grapheme clusters. Rich text with mixed fonts, sizes, colors, and inline styling. Gradient text, stroke outlines, affine transforms, and glyph placement on paths.
Zero-alloc draw path. Multi-page glyph atlas with automatic shelf packing and time-based eviction. IME composition with clause underlines and cursor feedback.
Line, bar, area, scatter, pie, candlestick, histogram, heatmap, radar, waterfall, and more. Interactive zoom, pan, and brush select with incremental updates for real-time dashboards.
Render to PNG or SVG with no window — 16x MSAA, export from CI, servers, or headless environments. Built-in data transforms: moving averages, regression, Bollinger bands, LTTB downsampling.
Time-travel debugging — scrub back through app state frame-by-frame with a built-in debugger window. Headless testing — runs all layout and widget logic without a display server. Theme system — dark, light, custom themes with a live theme picker widget.
Command registry with global hotkeys and a fuzzy-search command palette. 53 example apps ship with the framework. CI runs on every commit.
Single-line input to full multi-cursor code editor — go-edit handles the range. Piece-table undo with infinite history. Syntax highlighting with pluggable grammars. Completion hooks for LSP integration.
Search and replace with regex. Code folding. Diagnostics API for inline error markers. Designed to embed — use it as a widget in any go-gui window, apply custom themes, wire in language servers via completion hooks.
Tiled raster and vector maps with projection handling — OSM, WMS, and custom tile sources. Kinetic pan and zoom. Markers, polylines, polygons, and circles for geospatial overlays.
Legend, gallery, and overview companion widgets. Geospatial overlays with coordinate transforms. Every map is a standard go-gui widget — compose it with charts, tables, or forms in the same window.
A full-featured terminal emulator widget for the go-gui framework. Spawns a real shell over a PTY, renders through a GPU-accelerated draw canvas. Targets macOS, Linux, and Windows (ConPTY) with cross-platform PTY management.
24-bit Truecolor with Sixel and Kitty graphics protocol support. Kitty Keyboard Protocol and bracketed paste. Scrollback with search and shell integration marks for semantic navigation.