仓库:https://gitee.com/nuxui/nuxui
例子:https://gitee.com/nuxui/samples
创建 `hello` 项目
```go
mkdir hello
cd hello
```
创建 `main.go` 并编写
```go
package main
import (
"nuxui.org/nuxui/nux"
_ "nuxui.org/nuxui/ui"
)
func main() {
nux.Run(nux.NewWindow(nux.Attr{
"width": "20%", // screen_width x 20%
"height": "2:1", // width : height = 2 : 1
"title": "hello",
"content": nux.Attr{
"type": "nuxui.org/nuxui/ui.Text",
"text": `Hello nuxui`,
},
}))
}
```
更新依赖
```shell
go mod init example.com/my/hello
go mod tidy
```
编译并运行
```
go build . && ./hello
```
结果预览
![](https://nuxui.org/samples/screenshot_hello.jpg)
有疑问加站长微信联系(非本文作者))