Skip to content

antoniocali/oat-latte

Repository files navigation

oat-latte

oat-latte

A component-based TUI framework for Go.

oat-latte provides a two-pass layout engine (Measure/Render), a cooperative focus system, a composable style and theme system, and a library of ready-made widgets — all built on tcell.

Install

go get github.com/antoniocali/oat-latte

Requires Go 1.21+ and a true-color terminal for the built-in themes.

Quick start

package main

import (
    "log"

    oat "github.com/antoniocali/oat-latte"
    "github.com/antoniocali/oat-latte/latte"
    "github.com/antoniocali/oat-latte/layout"
    "github.com/antoniocali/oat-latte/widget"
)

func main() {
    input := widget.NewEditText().WithPlaceholder("Type something…")
    btn   := widget.NewButton("OK", func() { /* handle */ })

    body := layout.NewVBox(input, btn)

    app := oat.NewCanvas(
        oat.WithTheme(latte.ThemeDark),
        oat.WithBody(body),
    )

    if err := app.Run(); err != nil {
        log.Fatal(err)
    }
}

Examples

make run-tasklist  # Task list (tutorial app)
make run-notes     # Notes manager
make run-kanban    # Kanban board

Documentation

Full documentation is at oat-latte.dev.

Contributing

See CONTRIBUTING.md.

License

MIT

About

A component-based TUI framework for Go: two-pass layout, composable widgets, focus management, themes, and modal dialogs.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors