Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	Quit        key.Binding
	Kill        key.Binding
	ForceKill   key.Binding
	Filter      key.Binding
	ClearFilter key.Binding
	Sort        key.Binding
	Refresh     key.Binding
	ToggleAll   key.Binding
	Help        key.Binding
	Detail      key.Binding
	Back        key.Binding
	Up          key.Binding
	Down        key.Binding
	Confirm     key.Binding
	Cancel      key.Binding
}

KeyMap defines all TUI key bindings.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

func (KeyMap) FullHelp

func (km KeyMap) FullHelp() [][]key.Binding

FullHelp returns key bindings for the expanded help view.

func (KeyMap) ShortHelp

func (km KeyMap) ShortHelp() []key.Binding

ShortHelp returns key bindings for the compact help view.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the top-level Bubble Tea model.

func New

func New(refreshInterval, gracePeriod time.Duration) Model

New creates a new TUI Model.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Theme

type Theme struct {
	Title       lipgloss.Style
	Subtitle    lipgloss.Style
	Header      lipgloss.Style
	SelectedRow lipgloss.Style
	NormalRow   lipgloss.Style
	Listen      lipgloss.Style
	Established lipgloss.Style
	Dim         lipgloss.Style
	StatusBar   lipgloss.Style
	StatusKey   lipgloss.Style
	StatusValue lipgloss.Style
	Help        lipgloss.Style
	Warning     lipgloss.Style
	Error       lipgloss.Style
	Success     lipgloss.Style
	Border      lipgloss.Style
	DetailKey   lipgloss.Style
	DetailValue lipgloss.Style
}

Theme holds all TUI styles.

func DefaultTheme

func DefaultTheme() Theme

DefaultTheme returns the default moor color theme.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL