Project Structure
A Go project keeps application code in a Go module and development commands in a small Bun package.
#Generated files
my-app/
├── resources/
│ └── icon.png
├── main.go
├── go.mod
├── go.sum
├── quickgui.config.ts
├── package.json
└── README.mdCommit go.sum after resolving dependencies. Split larger apps into ordinary Go packages.
#Application entry
main.go starts native.Run and opens windows. A component is a function that returns *ui.Element. Return the UI you build — do not create views and ignore them.
func Hello() *ui.Element {
return ui.View().Padding(20).Gap(12).Children(
ui.Text("Hello from Go"),
ui.Button().Child("Continue").OnClick(func() {}),
)
}#Configuration
entry is the Go package to build. The config file is for the CLI; it is not loaded by the running app.
import { defineConfig } from "@quickgui/cli";
export default defineConfig({
name: "My App",
identifier: "com.example.my-app",
entry: ".",
});You can use quickgui.toml instead:
name = "My App"
identifier = "com.example.my-app"
entry = "."The CLI reads quickgui.toml before quickgui.config.ts. Pass --config configs/dev.toml to choose a file. Quote version values, for example version = "...".
The application icon comes from resources/icon.png. Extra files can be listed in resources. Bundle custom fonts with fonts. See App Icon and Bundled Resources.
export default defineConfig({
name: "My App",
identifier: "com.example.my-app",
entry: ".",
fonts: ["assets/MyFont.ttf"],
});#Packages
github.com/egoist/quickgui/go/native— windows and platform APIsgithub.com/egoist/quickgui/go/ui— components and stylesgithub.com/egoist/quickgui/go/reactive— owners and contexts used by advanced code
@quickgui/cli is a development dependency. To share your own components, see Authoring Extensions.
#Local development
quickgui dev
quickgui fmt
quickgui check
quickgui builddev reloads when you change Go source or the config file.
