Terminal-based user interface toolkit
  • Go 99.8%
  • Makefile 0.2%
Find a file
2026-01-26 08:15:44 -08:00
demos Simplify presentation demo 2025-12-11 13:15:53 -08:00
.gitignore Document TextView region tag fix 2021-08-02 11:27:18 -07:00
ansi.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
application.go Fix data race when resetting screen to nil 2026-01-18 03:39:53 +06:00
borders.go Fork tview as cview 2019-12-30 15:18:26 -08:00
box.go Return set title in Box.GetTitle 2025-12-11 14:10:51 -08:00
box_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
button.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
button_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
CHANGELOG Release v1.6.3 2025-12-20 09:40:37 -08:00
checkbox.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
checkbox_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
contextmenu.go Rename SetBorderPadding and GetBorderPadding as SetPadding and GetPadding 2020-10-26 10:41:47 -07:00
CONTRIBUTING.md Migrate to codeberg.org 2025-04-08 08:35:46 -07:00
DESIGN.md Migrate to codeberg.org 2025-04-08 08:35:46 -07:00
doc.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
doc_test.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
dropdown.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
flex.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
focus.go Add FocusManager 2020-10-16 09:25:21 -07:00
FORK.md Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
form.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
frame.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
go.mod Update dependencies 2026-01-26 08:15:44 -08:00
go.sum Update dependencies 2026-01-26 08:15:44 -08:00
grid.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
inputfield.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
keys.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
LICENSE Add TextView test case for escaping bracket characters 2025-11-24 21:24:35 -08:00
list.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
list_test.go Remove return values from methods which return their primitive (breaks chaining) 2020-10-07 16:35:21 -07:00
Makefile chore: Add makefile and use in gitlab-ci.yml 2020-09-23 20:54:48 +02:00
modal.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
mouse.go Print text using []byte instead of string, calculate string width using runewidth instead of uniseg 2020-10-06 13:16:37 -07:00
panels.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
primitive.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
progressbar.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
progressbar_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
README.md Replace screen recording with screenshot 2025-12-11 14:00:11 -08:00
screenshot.png Replace screen recording with screenshot 2025-12-11 14:00:11 -08:00
semigraphics.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
slider.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
styles.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
tabbedpanels.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
table.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
table_test.go Store ListItem text as []byte instead of string 2020-10-06 18:19:40 -07:00
textview.go Fix drawing highlighted TextView regions 2025-12-11 11:16:18 -08:00
textview_test.go Update dependencies 2026-01-26 08:15:44 -08:00
treeview.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
treeview_test.go Add comments to tests 2020-04-28 14:58:37 -07:00
util.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
util_test.go Update dependencies 2026-01-26 08:15:44 -08:00
window.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00
windowmanager.go Upgrade to tcell/v3 (#96) 2025-12-11 19:26:42 +01:00

cview - Terminal-based user interface toolkit

GoDoc Donate

This package is a fork of tview. See FORK.md for more information.

Demo

ssh cview.rocket9labs.com -p 20000

Screenshot of presentation demo

Features

Available widgets:

  • Input forms (including input/password fields, drop-down selections, checkboxes, and buttons)
  • Navigable multi-color text views
  • Selectable lists with context menus
  • Modal dialogs
  • Horizontal and vertical progress bars
  • Grid, Flexbox and tabbed panel layouts
  • Sophisticated navigable table views
  • Flexible tree views
  • Draggable and resizable windows
  • An application wrapper

Widgets may be customized and extended to suit any application.

Mouse support is available.

Applications

A list of applications powered by cview is available via pkg.go.dev.

Installation

go get codeberg.org/tslocum/cview

Hello World

This basic example creates a TextView titled "Hello, World!" and displays it in your terminal:

package main

import (
	"codeberg.org/tslocum/cview"
)

func main() {
	app := cview.NewApplication()

	tv := cview.NewTextView()
	tv.SetBorder(true)
	tv.SetTitle("Hello, world!")
	tv.SetText("Lorem ipsum dolor sit amet")
	
	app.SetRoot(tv, true)
	if err := app.Run(); err != nil {
		panic(err)
	}
}

Examples are available via godoc and in the demos directory.

For a presentation highlighting the features of this package, compile and run the program in the demos/presentation directory.

Documentation

Package documentation is available via godoc.

An introduction tutorial is also available.

Dependencies

This package is based on github.com/gdamore/tcell (and its dependencies) and github.com/rivo/uniseg.

Support

CONTRIBUTING.md describes how to share issues, suggestions and patches (pull requests).