nuxui
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Write your first app

create hello project

mkdir hello
cd hello

create a hello.go file and programing:

package main

import (
    "nuxui.org/nuxui/nux"
    _ "nuxui.org/nuxui/ui"
)

func main() {
    nux.Run(nux.NewWindow(nux.Attr{
        "width":  "15%", // screen_width x 15%
        "height": "2:1", // width : height = 2 : 1
        "title":  "hello",
        "content": nux.Attr{
            "type": "nuxui.org/nuxui/ui.Text",
            "text": `Hello nuxui`,
        },
    }))

}

then update dependencies

go mod init example.com/hello
go mod tidy

build and run hello

go build . && ./hello

result screenshot