|
4 years ago | |
---|---|---|
.. | ||
CODE_OF_CONDUCT.md | 4 years ago | |
CONTRIBUTING.md | 4 years ago | |
LICENSE.txt | 4 years ago | |
README.md | 4 years ago | |
ansi.go | 4 years ago | |
application.go | 4 years ago | |
borders.go | 4 years ago | |
box.go | 4 years ago | |
button.go | 4 years ago | |
checkbox.go | 4 years ago | |
doc.go | 4 years ago | |
dropdown.go | 4 years ago | |
flex.go | 4 years ago | |
focusable.go | 4 years ago | |
form.go | 4 years ago | |
frame.go | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
grid.go | 4 years ago | |
inputfield.go | 4 years ago | |
list.go | 4 years ago | |
modal.go | 4 years ago | |
pages.go | 4 years ago | |
primitive.go | 4 years ago | |
semigraphics.go | 4 years ago | |
styles.go | 4 years ago | |
table.go | 4 years ago | |
textview.go | 4 years ago | |
treeview.go | 4 years ago | |
tview.gif | 4 years ago | |
util.go | 4 years ago |
This Go package provides commonly needed components for terminal based user interfaces.
Among these components are:
They come with lots of customization options and can be easily extended to fit your needs.
go get github.com/rivo/tview
This basic example creates a box titled "Hello, World!" and displays it in your terminal:
package main
import (
"github.com/rivo/tview"
)
func main() {
box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!")
if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
panic(err)
}
}
Check out the GitHub Wiki for more examples along with screenshots. Or try the examples in the "demos" subdirectory.
For a presentation highlighting this package, compile and run the program found in the "demos/presentation" subdirectory.
Refer to https://pkg.go.dev/github.com/rivo/tview for the package's documentation.
This package is based on github.com/gdamore/tcell (and its dependencies) as well as on github.com/rivo/uniseg.
Add your issue here on GitHub. Feel free to get in touch if you have any questions.