Gio UI
Cross-Platform GUI for Go

Gio implements portable immediate mode GUI programs in Go. Gio programs run on all the major platforms: iOS/tvOS, Android, Linux (Wayland/X11), macOS, Windows, FreeBSD, OpenBSD, and experimental support for browsers (Webassembly/WebGL). There is a unikernel port for running Gio programs in virtual machines.

Gio includes an efficient vector renderer based on the Pathfinder project, and an experimental renderer based on the piet-gpu project. Both renderers support Vulkan, Metal, Direct3D 11, and OpenGL ES. For low-end devices there is a CPU fallback that runs on unextended OpenGL ES 2.0.

Text and other shapes are rendered using only their outlines without baking them into texture images, to support efficient animations, transformed drawing and display resolution independence.

This is a screenshot of the Kitchen example. If your browser supports WebAssembly and WebGL, run the example by pressing the run button.

Kitchen screenshot


The architecture document is a good introduction to Gio concepts and API.

The examples give a feel of the structure of typical Gio programs.

Jon Strand’s tutorial is an great step-by-step guide to writing Gio programs.

The “Immediate Mode GUI Programming” article compares Gio’s immediate mode design with the traditional retained mode APIs such as the browser DOM.

Reference documentation

Operations and stateful operation lists are the low-level primitives of Gio. The important operations are for drawing and clipping, as well as pointer and keyboard input.

The layout package implements useful layouts, while the widget and widget/material packages implement common user interface widgets. The gesture package detects common gestures from lower-level input events.

Layouts, widgets and gestures are all implemented in terms of operations.

Package app is for creating windows and apply operations to them. Only the app package and its sub-packages have native dependencies, making Gio highly portable.



Gio is designed to work with very few dependencies. It depends only on the platform libraries for window management, input and GPU drawing.

Gio supports the latest released version of Go in module mode. Earlier versions of Go and GOPATH mode might work, but no effort is made to keep them working.

Running Gio programs

Use the go tool to initialize a new module and run the “hello” example:

$ go mod init
$ go run

should display a simple message in a window.

The command

$ go run

is another example that demonstrates the material design widgets.

Running on mobiles

For Android, iOS, tvOS the gogio tool can build and package a Gio program for you.

To build an Android .apk file from the kitchen example:

$ go run -target android

To build for the iOS simulator:

$ go run -target ios -appid <bundle-id>

See the running on mobile page for more information.


To run a Gio program in a compatible browser, the gogio tool can output a directory ready to serve. With the goexec tool you don’t even need a web server:

$ go run -target js
$ go get
$ goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir("kitchen")))'

Open http://localhost:8080 in a browser to run the program.

Integration with existing projects

See the integration guide for details on using Gio with existing projects.

Programs using Gio

Source code

The source code, mailing lists and issue tracker for Gio are hosted on sourcehut. The examples are in the gio-example repository.



File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/ For general discussion, use the ~eliasnaur/ mailing list or the #gioui Gophers Slack workspace (Need an invite to gophers slack?.


Post patches to the gio-patches list. No Sourcehut account is required and you can post without being subscribed.

You can also use the Sourcehut web-based flow for submitting patches, similar to other source forges. See the contribution guide for more details.


Development of Gio is funded by sponsorships. If you find Gio useful, please consider sponsoring the project on OpenCollective or one or more of its developers directly.