Cross-Platform GUI
for Go

Hybrid immediate-mode framework — no virtual DOM, no diffing. GPU-accelerated via Metal, OpenGL, and WebGPU. 50+ widgets, 6 companion libraries.

🍎 macOS🪟 Windows🐧 Linux 📱 iOS🤖 Android🌐 Web / WASM
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

Try It Now

Pre-built showcase binaries — download and run, no installation required

🌐 Browser (WASM) · ⬇️ macOS · Windows · Linux · iOS · Android
go-gui showcase

Showcase contains the framework documentation. Every widget demo has a button in the upper-right corner that displays documentation about the widget.

Why

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.

A Complete Ecosystem

Six libraries — each focused on one job, all built on go-gui core

G

go-gui

Core framework — widgets, constraint layout, event system, GPU-accelerated retained-mode scene graph.

  • 50+ widgets: buttons to DataGrid to DockLayout
  • Metal, OpenGL, WebGPU backends
  • Time-travel debugging & headless testing
View on GitHub →
Γ

go-glyph

Browser-quality text rendering — BiDi, multi-grapheme clusters, complex scripts — plus vector icons and glyph rasterization.

  • Pango shaping, FreeType rasterization
  • Gradient text, outlines, affine transforms
  • Rich text with mixed fonts and styles
View on GitHub →

go-charts

Declarative charting — line, bar, area, pie, scatter, candlestick — incremental updates for real-time dashboards.

  • 18+ chart types with headless PNG/SVG export
  • Built-in data transforms: SMA, regression, LTTB
  • Zoom, pan, brush select out of the box
View on GitHub →
{ }

go-edit

Text editing — single-line to multi-cursor code editor, piece-table undo, syntax highlighting, completion hooks.

  • Multi-cursor editing & syntax highlighting
  • Search/replace with regex, code folding
  • Diagnostics API, extension substrate
View on GitHub →

go-map

Tiled raster/vector map widget with projection handling, markers, and geospatial overlays.

  • OSM & WMS tile sources, kinetic pan/zoom
  • Markers, polylines, polygons, circles
  • Legend, gallery & overview companion widgets
View on GitHub →
>_

go-term

Embeddable terminal emulator — PTY, ANSI/VT parser, render surface as a go-gui widget.

  • 24-bit Truecolor, Sixel & Kitty graphics
  • Kitty Keyboard Protocol, bracketed paste
  • Scrollback, search, semantic shell marks
View on GitHub →

Built to Scale

Deep capabilities across rendering, widgets, text, and developer tooling

Rendering

GPU-Accelerated, Single-Pass Pipeline

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.

3GPU Backends
1Pass / Frame
Benchmark results
Performance

Animation Subsystem

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.

4Animation Types
60fpsTarget
Widgets

50+ Widgets, One Consistent API

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.

Widget gallery
Text & Typography

Browser-Quality Text, Powered by go-glyph

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.

Text styling capabilities
Data Visualization

18+ Chart Types, Headless Export

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.

Chart showcase
Developer Experience

Developer Tooling

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.

Inspector debugging tool
Code Editing

Text Editing

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.

InfiniteUndo History
Multi-CursorEditing
go-edit code editor
Mapping

Maps as Native Widgets

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.

OSM& WMS Tiles
Vector& Raster
go-map demo
Terminal

Embeddable Terminal Emulator

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.

Truecolor24-bit
Sixel& Kitty GFX
go-term terminal emulator