Golang terminal dashboard
b3075f7313
Fix two image links on readme |
||
---|---|---|
_examples | ||
scripts | ||
test | ||
.gitignore | ||
.travis.yml | ||
barchart.go | ||
block_common.go | ||
block_test.go | ||
block_windows.go | ||
block.go | ||
buffer_test.go | ||
buffer.go | ||
canvas_test.go | ||
canvas.go | ||
CHANGELOG.md | ||
doc.go | ||
events_test.go | ||
events.go | ||
gauge.go | ||
go.mod | ||
go.sum | ||
grid_test.go | ||
grid.go | ||
LICENSE | ||
linechart_others.go | ||
linechart_windows.go | ||
linechart.go | ||
list.go | ||
paragraph_test.go | ||
paragraph.go | ||
piechart.go | ||
position_test.go | ||
position.go | ||
README.md | ||
render.go | ||
sparkline.go | ||
stacked_barchart.go | ||
table.go | ||
tabpane.go | ||
textbuilder_test.go | ||
textbuilder.go | ||
theme_test.go | ||
theme.go | ||
utils_test.go | ||
utils.go | ||
widget.go |
termui
termui
is a cross-platform, easy-to-compile, and fully-customizable terminal dashboard built on top of termbox-go. It is inspired by blessed-contrib and written purely in Go.
termui is currently undergoing some API changes so make sure to check the changelog when upgrading
Installation
Installing from the master branch is recommended:
go get -u github.com/gizak/termui@master
Usage
Hello World
package main
import ui "github.com/gizak/termui"
func main() {
err := ui.Init()
if err != nil {
panic(err)
}
defer ui.Close()
p := ui.NewParagraph("Hello World!")
p.Width = 25
p.Height = 5
ui.Render(p)
for e := range ui.PollEvents() {
if e.Type == ui.KeyboardEvent {
break
}
}
}
Widgets
Click image to see the corresponding demo codes.
Examples
Examples can be found in _examples. Run with go run _examples/...
or run all of them consecutively with ./scripts/run_examples.py
.
Documentation
Uses
Related Works
License
This library is under the MIT License