-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Cross-platform, hybrid immediate-mode GUI framework for Go — no virtual DOM, no diffing, just fast, composable UI.
Go-gui is built on a simple premise: every frame, a plain Go function returns a layout tree that gets sized, positioned, and rendered directly to the screen. State lives in a single typed slot per window. No widget objects to manage, no lifecycle hooks to wire up, no hidden machinery keeping views and models in sync. You write a function; the framework calls it.
That simplicity doesn't come at the cost of capability. Go-gui ships with 50+ widgets, a full animation subsystem, GPU-accelerated rendering, production-grade accessibility, and native platform integration — all available from day one, without additional configuration.
Most Go GUI toolkits ask you to accept a tradeoff: either the simplicity of an immediate-mode approach or the power of a retained-mode system. The immediate-mode path keeps code simple but struggles at scale — state management becomes manual, large datasets require hand-rolled virtualization, and accessibility is typically absent. The retained-mode path solves those problems but introduces widget ownership models, observable-property wiring, and framework magic that grows increasingly opaque as apps get larger.
Go-gui takes a different approach. The surface API is immediate-mode — plain Go functions, minimal boilerplate, predictable data flow. Beneath it, a retained layout engine handles sizing, scrolling, focus, and animation with a stable identity system. You get the clarity of immediate mode and the capability of a retained framework, without managing either one directly.
A few specific points worth noting:
- No allocation pressure from the view model. The layout tree is rebuilt each frame from value types; the framework does not allocate per-widget heap objects that the GC must track.
- Virtualization is built in. DataGrid renders large datasets with no manual tuning; the framework handles which rows are in view.
- Accessibility is not optional. Semantic ARIA roles, IME support, and platform accessibility trees (AT-SPI on Linux, NSAccessibility on macOS) are part of the core, not an afterthought.
- Time-travel debugging ships with the framework. Opt in with one flag and a scrubber window lets you rewind app state frame by frame.
| Area | Details |
|---|---|
| Widgets | 50+ built-in: inputs, selectors, tables, trees, tabs, menus, dialogs, toasts, breadcrumbs, date pickers, color pickers, spinners, and more |
| Layouts | Row, Column, Wrap, Canvas, Splitter, DockLayout, ExpandPanel, OverflowPanel, RotatedBox |
| Data | DataGrid with virtual rows, multi-column sort, per-column filters, inline editing, CSV/TSV/XLSX/PDF export |
| Rendering | SDL2 + Metal (macOS) / OpenGL (Linux/Windows); Web/WASM; iOS Metal; custom GPU shaders |
| Text | Professional-grade shaping via go-glyph: bidi/RTL, emoji, grapheme clusters, Markdown, RTF, syntax highlighting |
| Animation | Keyframe, spring, tween, hero transitions, layout (FLIP-style) |
| Effects | Box shadows, Gaussian blur, color filters (grayscale, sepia, contrast, brightness), SVG |
| Input | Touch gestures: tap, double-tap, long-press, pan, swipe, pinch, rotate |
| Platform | Native file/print dialogs, OS notifications, system tray, native menus, spell check, IME, multi-window |
| Accessibility | AT-SPI (Linux), NSAccessibility (macOS), full ARIA role tree |
| Developer tools | Time-travel debugger, headless test backend, layout inspector |
| Project | Description |
|---|---|
| go-charts | Interactive chart widgets |
| go-edit | Code editor widget |
| go-map | SMIL map widgets |
| go-term | Embeddable terminal emulator |
| go-glyph | Text rendering engine |
| Page | What it covers |
|---|---|
| Installation | System requirements, per-OS dependency setup, getting the module |
| Getting Started | First app walkthrough — window, state, view function, widgets |
| Architecture | Immediate-mode paradigm, frame pipeline, core types, package map |
| Widgets | Widget catalogue by category |
| Layouts | Layout system, sizing modes, containers |
| Events | Event types, routing, handlers, propagation |
| Focus and Scrolling | The ID system — why IDs, IDFocus, IDScroll, scroll API |
| State Management | Per-window typed state, StateMap |
| Theming | Built-in themes, Opt[T] overrides, custom themes |
| Animations | Tween, spring, keyframe, hero, layout transitions |
| Graphics | DrawCanvas, SVG, gradients, shaders, visual effects |
| Advanced | Multi-window, keyboard commands, gestures, native integration, audio |
| Locales | Locale system — number, date, currency formatting; built-in presets; i18n |
Getting Started
Widgets
Layout & Interaction
Visuals
Reference