Skip to content
A dado dashboard rendered in the terminal

dado

Beautiful terminal UIs for Go. Themeable, composable, and built on tview.

54 Components

Data grids, charts, modals, forms, git graphs, node graphs, and more — all ready to drop into your TUI app.

26 Built-in Themes

Nord, Dracula, Catppuccin, Tokyo Night, Gruvbox, Rosé Pine, and many more. Switch themes at runtime with a single call.

Built on tview

dado wraps rivo/tview with a clean component model — you get the power of tview with a better API.

Typed Event System

Focus, key, change, submit, and activate events flow through a consistent typed interface across every component.

package main
import (
"log"
"github.com/atterpac/dado/components"
"github.com/atterpac/dado/layout"
"github.com/atterpac/dado/theme"
"github.com/atterpac/dado/theme/themes"
"github.com/rivo/tview"
)
// HomeView is a page in the app. Embedding *tview.Flex satisfies
// tview.Primitive; the four methods below satisfy nav.Component.
type HomeView struct {
*tview.Flex
}
func NewHomeView() *HomeView {
v := &HomeView{Flex: tview.NewFlex().SetDirection(tview.FlexColumn)}
// Drop components straight into the layout.
v.AddItem(components.NewBadge("Ready").SetVariant(components.BadgeSuccess), 0, 1, false)
v.AddItem(components.NewBadge("3").SetVariant(components.BadgeError).SetPill(true), 0, 1, false)
return v
}
func (v *HomeView) Name() string { return "Home" }
func (v *HomeView) Start() {}
func (v *HomeView) Stop() {}
func (v *HomeView) Hints() []components.KeyHint { return nil }
func main() {
theme.SetProvider(themes.Nord) // one of 26 built-in themes
app := layout.NewApp(layout.AppConfig{})
app.Pages().Push(NewHomeView())
if err := app.Run(); err != nil {
log.Fatal(err)
}
}