A modern GUI framework for Go

Build modern, cross-platform applications entirely in Go. No browser runtime. No JavaScript. No HTML or CSS.

go-gui
$ go get github.com/go-gui-org/go-gui
$ # one Go module — macOS, Windows, Linux, iOS, Android, Web

MIT licensed · open source · latest release on GitHub.

demo

go-gui — showcase
The go-gui showcase application, built with the framework itself

The showcase app — built with the framework itself. Run it live in your browser.

code

NAME

go-gui — your UI is Go code, your state is Go data. The framework handles layout, rendering, input, and state.

SYNOPSIS

// Smallest stateful app: one button and one counter.
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.SimpleWindow("Get Started", 300, 300, &App{}, func(w *gui.Window) {
		w.SetView(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.Label(fmt.Sprintf("%d Clicks", app.Clicks), gui.TextStyle{}),
			gui.TextButton("Click Me", func(ctx gui.EventCtx) {
				gui.State[App](ctx.Window).Clicks++
			}),
		},
	})
}

The framework handles layout, rendering, input, and state. You write the application.

no-browser

DESCRIPTION

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

PROPERTIES

No DOMYour UI is not a web page.
No JS bridgeApplication logic stays in Go.
No hidden browserDesktop apps render natively — Metal on macOS and iOS, cgo-free OpenGL on Windows and Linux, WebGPU in the browser.

libraries

Six focused libraries, one rendering pipeline. Each is usable on its own — together they cover what a real application needs.

go-edit — a code editor, as a widget

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.

  • Multi-cursor editing & pluggable grammars
  • Piece-table undo with infinite history
  • Completion hooks for LSP integration
go-edit
go-edit code editor

go-charts — data visualization without leaving Go

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.

  • Headless PNG/SVG export for CI and servers
  • Built-in transforms: SMA, regression, LTTB
  • Interactive zoom, pan, brush select
go-charts
go-charts charting showcase

go-glyph — text is harder than it looks

Hello · مرحبا · 日本語 · 中文 · Ελληνικά

Complex scripts, bidirectional text, grapheme clusters, and font fallback. Browser-quality rendering without a browser.

  • HarfBuzz shaping, pure-Go rasterization — no cgo, no system deps
  • Rich text with mixed fonts and styles
  • Multi-page glyph atlas with shelf packing
go-glyph
go-glyph text rendering capabilities

go-map — maps as native widgets

Tiled raster and vector maps with projection handling. OSM and WMS tile sources, kinetic pan and zoom, markers and geospatial overlays.

  • Legend, gallery & overview companion widgets
  • Polylines, polygons, circles, coordinate transforms
  • Compose with charts, tables, or forms in one window
go-map
go-map map widget

go-term — an embeddable terminal

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.

  • 24-bit Truecolor, Sixel & Kitty graphics
  • Kitty Keyboard Protocol, bracketed paste
  • Scrollback with search and shell marks
go-term
go-term terminal emulator

go-gui — the framework under all of it

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.

  • DataGrid with built-in virtualization and export
  • DockLayout with drag-and-drop panels
  • Keyframe, spring, tween, hero animations
go-gui — widgets

widgets

50+ widgets. One API. Buttons, inputs, tables, trees, menus, dialogs, docks — every widget follows the same config-struct pattern and event model.

widget gallery
The go-gui widget gallery

The widget gallery — run it yourself in the browser showcase.

performance

5,000 widgets.

Continuously rendered. No virtualization. No special cases.

benchmark
The go-gui benchmark window showing live frame timings

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.

capabilities

BUILT FOR REAL APPLICATIONS

Not another button-and-label toolkit.

LayoutMulti-pass constraint layout: rows, columns, wrapping, splitters, docking with drag-and-drop panels.
DataDataGrid with virtual rows, multi-column sort, per-column filters, inline editing, and CSV/TSV/XLSX/PDF export.
TextComplex-script shaping, bidirectional text, font fallback, rich text — browser-quality, without a browser.
AccessibilityARIA roles, IME, AT-SPI on Linux, NSAccessibility on macOS. Built into the core, not bolted on.
DebuggingLayout inspector. Time-travel: scrub backward through application state frame by frame.
TestingRun the UI headlessly. No display server required.

architecture

SIMPLE ON THE SURFACE

An immediate-style programming model without the limitations usually associated with immediate-mode GUIs.

01 · Plain GoViews are produced by ordinary Go functions. No template language, no JSX, no bridge.
02 · Stable identityWidgets carry IDs; focus, scrolling, and state persist where it matters, frame after frame.
03 · Deterministic stateOne 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.

platforms

One codebase. Same application, same widgets, same layout system — different GPU backends, same code.

macOSWindowsLinuxiOSAndroidWeb

get-started

One INI-free install. One Go module.

$ go get github.com/go-gui-org/go-gui

made-with

Real applications. Real code. Click through to the source.