Stop Fighting Go GUIs: Build Sleek Desktop Apps in Pure Go with Proton

go dev.to

Proton

A GUI library for Go. Built on Gio. No C deps, pure Go.

Example apps (made using Proton)

Note: These are very basic, you can make even better apps.

Logo

Getting started

package main
import "github.com/CzaxStudio/proton"

type UI struct {
    name proton.Editor
    btn  proton.Clickable
}

func main() {
    u := &UI{}
    a := proton.New("my app")
    a.Window("Hello", 480, 300, func(win *proton.Win) {
        proton.H3(win, "Hello from Proton!")
        proton.Gap(win, 8)
        proton.Input(win, &u.name, "Your name")
        proton.Gap(win, 8)
        if proton.Button(win, &u.btn, "Go") {
            println("Hello,", u.name.Text())
Enter fullscreen mode Exit fullscreen mode

Source: dev.to

arrow_back Back to Tutorials