GothUI

GOTHUI / DOCUMENTATION

From module to interface.

Install GothUI, serve its embedded CSS, and render your first page.

1. Add the module

Use Go 1.26 or newer. Choose a patched compiler for deployed applications. Install the first stable release:

go mod init example.com/myapp
go get github.com/Tend-Stack/GothUI/v2026@v2026.1.0
go install github.com/a-h/templ/cmd/templ@v0.3.1100

The repository currently requires GitHub access. For private-module downloads, configure your normal Git credentials and GOPRIVATE=github.com/Tend-Stack/GothUI. Never put credentials in source or import URLs.

2. Create a page

Save this as page.templ. Go structs configure the component; ordinary HTML supplies the content.

package main

import "github.com/Tend-Stack/GothUI/v2026/components"

templ page() {
    @components.Layout(components.LayoutProps{
        Title: "My GothUI app",
        Language: "en",
        Theme: components.ThemeSystem,
    }, body())
}

templ body() {
    <main>
        <h1>Hello, GothUI.</h1>
        @components.Card(components.CardProps{}) {
            <p>A little less setup. A little more making.</p>
        }
    </main>
}

3. Serve the page and stylesheet

Save this as main.go. The layout links the same stylesheet path served by AssetHandler.

package main

import (
    "log"
    "net/http"
    "time"

    "github.com/Tend-Stack/GothUI/v2026"
    "github.com/a-h/templ"
)

func main() {
    mux := http.NewServeMux()
    mux.Handle(gothui.AssetPath, gothui.AssetHandler())
    mux.Handle("GET /{$}", templ.Handler(page()))
    server := &http.Server{
        Addr: ":8080", Handler: mux,
        ReadHeaderTimeout: 5 * time.Second,
    }
    log.Fatal(server.ListenAndServe())
}

4. Generate and run

templ generate
go run .

Open http://localhost:8080. To ship the app, run go build. Your generated Go and embedded CSS become one executable.

Versioning

Releases use YEAR.RELEASE.FIX, starting with v2026.1.0. The module suffix /v2026 follows Go’s major-version rules. Fixes on this line retain the suffix.