A Go package that supplies interactive widgets and layouts for building rich terminal-based user interfaces.
Overview
tview is a Go package for terminal user interfaces. It bundles commonly used interactive components so you can build full-screen or structured TUIs without assembling low-level terminal drawing yourself.
Included widgets cover input forms with text fields, selections, checkboxes, and buttons; navigable multi-color text views; editable multi-line text areas; table and tree views; selectable lists; images; grid, flexbox, and page layouts; modal message windows; and an application wrapper that ties the UI together. Components expose customization options and are designed to be extended.
You add the package to a Go project and run programs in the terminal, as in the bundled hello-world style examples. The library builds on gdamore/tcell for terminal handling and rivo/uniseg for text segmentation. Wiki examples and demo programs illustrate more involved UIs.
Other Go projects listed in the documentation use tview for terminal front ends. The maintainer aims to preserve backwards compatibility across upgrades, though behavior may change when a bug is fixed rather than when an intentional feature is altered.
Key features
- Input forms with selections and checkboxes
- Navigable multi-color text views
- Editable multi-line text areas
- Table and tree views
- Selectable lists and images
- Grid, flexbox, and page layouts
- Modal message windows
- Application wrapper for TUIs
Use cases
- Interactive terminal dashboards
- CLI tools with forms and tables
- Navigable in-terminal data browsers
- Demo and presentation programs in the terminal