Socket
Socket
Sign inDemoInstall

github.com/valdemarpavesi/tui-go

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/valdemarpavesi/tui-go

Package tui is a library for building user interfaces for the terminal. Widgets are the main building blocks of any user interface. They allow us to present information and interact with our application. It receives keyboard and mouse events from the terminal and draws a representation of itself. Widgets are structured using layouts. Layouts are powerful tools that let you position your widgets without having to specify their exact coordinates. Here, the VBox will ensure that the Button will be placed underneath the Label. There are currently three layouts to choose from; VBox, HBox and Grid. Sizing of widgets is controlled by its SizePolicy. For now, you can read more about how size policies work in the Qt docs: http://doc.qt.io/qt-5/qsizepolicy.html#Policy-enum


Version published

Readme

Source

tui: Terminal UI for Go

Build Status GoDoc Go Report Card License MIT stability-unstable

A UI library for terminal applications.

tui (pronounced tooey) provides a higher-level programming model for building rich terminal applications. It lets you build layout-based user interfaces that (should) gracefully handle resizing for you.

Screenshot

Installation

go get github.com/marcusolsson/tui-go

Usage

package main

import "github.com/marcusolsson/tui-go"

func main() {
	box := tui.NewVBox(
		tui.NewLabel("tui-go"),
	)

	ui := tui.New(box)
	ui.SetKeybinding("Esc", func() { ui.Quit() })

	if err := ui.Run(); err != nil {
		panic(err)
	}
}

If you want to know what it is like to build terminal applications with tui-go, check out some of the examples.

Documentation

The documentation is rather bare at the moment due to the API changing pretty frequently. You can however explore the API in its current form at godoc.org.

For now, the best way to learn tui-go is to study and learn from the examples.

Contributing

If you're using tui-go for your application, please let me know what works well for you, and especially what doesn't (bug reports are greatly appreciated!).

Pull requests are very much welcome! Check out the current issues to find out how you can help. If you do find anything interesting, please assign yourself to that issue so that others know you're working on it. If you want to contribute a feature not currently not listed, please create a new issue with a description of what you want to do.

Please post any feature requests you might have. Smaller requests might end up being implemented rather quickly and larger ones will be considered for the road map.

Contributors

tui-go is mainly influenced by Qt and offers a similar programming model that has been adapted to Go and the terminal.

For an overview of the alternatives for writing terminal user interfaces, check out this article by AppliedGo.

License

tui-go is released under the MIT License.

FAQs

Last updated on 08 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc