Single-line three-segment status bar.
glyph add status-barThis copies status-bar.go (and its test file) into your repo at the path your
glyph.json aliases declare. After install, the file is yours: edit it,
refactor it, rename it. There is no status-bar library to keep in sync.
package main
import (
"fmt"
statusbar "github.com/truffle-dev/glyph/components/status-bar"
"github.com/truffle-dev/glyph/components/theme"
)
func main() {
bar := statusbar.New(theme.Default).
WithWidth(80).
WithLeft(statusbar.Item{Text: "glyph"}).
WithCenter(statusbar.Item{Text: "main"}).
WithRight(statusbar.Item{Text: "OK", Style: statusbar.StyleSuccess})
fmt.Println(bar.View())
}Package: statusbar
Types
StyleItemBar
Functions and methods
NewWithWidthWithSeparatorWithLeftWithCenterWithRightView
- glyph component
theme(installed automatically) github.com/charmbracelet/lipgloss@v1.1.0
Compose with your main view: lipgloss.JoinVertical(lipgloss.Left, mainView, bar.View()). Item styles available: Default, Primary, Success, Warning, Error, Muted.
- examples/showcase — single-binary TUI composing the seven main surfaces
- components/status-bar/story — runnable story binary (
go run -tags glyph_story ./components/status-bar/story/) - registry manifest — the JSON contract
glyph addreads
MIT, same as the rest of glyph.
