Skip to content

gogpu/ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

GoGPU Logo

gogpu/ui

Pure Go GUI Toolkit
Modern widgets, layouts, and styling — built on GoGPU

Status Requires License


Status: Planned

This project is not yet started. It will be developed after gogpu/gogpu reaches v0.2.0 (basic 2D rendering).

Star the repo to be notified when development begins!


Vision

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

Planned Features

Widgets

  • Button, Label, TextInput
  • Checkbox, Radio, Slider
  • Dropdown, ComboBox
  • List, Table, Tree
  • Tabs, Accordion
  • Modal, Tooltip, Popup
  • ScrollView, SplitPane

Layouts

  • Flex (row/column)
  • Grid
  • Stack
  • Absolute positioning

Styling

  • CSS-like styling
  • Themes (dark/light)
  • Custom fonts
  • Icons (embedded SVG)

Accessibility

  • Keyboard navigation
  • Screen reader support
  • High contrast mode

Architecture

┌─────────────────────────────────────┐
│         Your Application            │
├─────────────────────────────────────┤
│            gogpu/ui                 │  ← This library
│    Widgets, Layouts, Styling        │
├─────────────────────────────────────┤
│            gogpu/gg                 │
│         2D Graphics API             │
├─────────────────────────────────────┤
│           gogpu/gogpu               │
│      GPU, Window, Input, Math       │
├─────────────────────────────────────┤
│          WebGPU Runtime             │
└─────────────────────────────────────┘

Target API

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.


Inspiration


Timeline

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

Related Projects

Project Description
gogpu/gogpu Graphics framework (foundation)
gogpu/gg 2D graphics library
gogpu/naga Shader compiler

Contributing

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

License

MIT License — see LICENSE for details.


gogpu/ui — The GUI toolkit Go deserves

About

Pure Go GUI toolkit built on GoGPU — widgets, layouts, styling

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published