Pure Go GUI Toolkit
Modern widgets, layouts, and styling — built on GoGPU
This project is not yet started. It will be developed after
gogpu/gogpureaches v0.2.0 (basic 2D rendering).Star the repo to be notified when development begins!
A modern, GPU-accelerated GUI toolkit for Go that:
- Zero CGO — Pure Go, simple
go build - GPU Rendered — Smooth 60fps UI with hardware acceleration
- Immediate + Retained — Flexible rendering modes
- Cross-Platform — Windows, Linux, macOS
- Themeable — Built-in dark/light themes, custom styling
- Button, Label, TextInput
- Checkbox, Radio, Slider
- Dropdown, ComboBox
- List, Table, Tree
- Tabs, Accordion
- Modal, Tooltip, Popup
- ScrollView, SplitPane
- Flex (row/column)
- Grid
- Stack
- Absolute positioning
- CSS-like styling
- Themes (dark/light)
- Custom fonts
- Icons (embedded SVG)
- Keyboard navigation
- Screen reader support
- High contrast mode
┌─────────────────────────────────────┐
│ Your Application │
├─────────────────────────────────────┤
│ gogpu/ui │ ← This library
│ Widgets, Layouts, Styling │
├─────────────────────────────────────┤
│ gogpu/gg │
│ 2D Graphics API │
├─────────────────────────────────────┤
│ gogpu/gogpu │
│ GPU, Window, Input, Math │
├─────────────────────────────────────┤
│ WebGPU Runtime │
└─────────────────────────────────────┘
package main
import (
"github.com/gogpu/gogpu"
"github.com/gogpu/ui"
)
func main() {
app := gogpu.NewApp(gogpu.Config{
Title: "My App",
Width: 800,
Height: 600,
})
// Create UI
root := ui.Column(
ui.Label("Hello, GoGPU!").FontSize(24),
ui.Row(
ui.Button("Click Me").OnClick(func() {
println("Clicked!")
}),
ui.Button("Cancel"),
).Gap(8),
ui.TextInput().Placeholder("Enter text..."),
).Padding(16).Gap(12)
app.SetRoot(root)
app.Run()
}Note: This API is a design target, not implemented yet.
- egui (Rust) — Immediate mode GUI
- Gio (Go) — Portable GUI
- Flutter — Widget composition
- SwiftUI — Declarative syntax
- Tailwind CSS — Utility-first styling
| Phase | Milestone | Depends On |
|---|---|---|
| Phase 1 | Basic widgets | gogpu v0.2.0 |
| Phase 2 | Layouts | Phase 1 |
| Phase 3 | Styling/Themes | Phase 2 |
| Phase 4 | Advanced widgets | Phase 3 |
| Phase 5 | Accessibility | Phase 4 |
| Project | Description |
|---|---|
| gogpu/gogpu | Graphics framework (foundation) |
| gogpu/gg | 2D graphics library |
| gogpu/naga | Shader compiler |
This project is in the planning phase. Contributions to the design are welcome!
- Open issues to discuss widget designs
- Share inspiration from other GUI toolkits
- Help define the styling system
MIT License — see LICENSE for details.
gogpu/ui — The GUI toolkit Go deserves
