tui

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const INPUT_FORMAT_BASE_ACTIONS = "\n\n%s\n\n%s\n%s"
View Source
const QUIT_ACTION = "(ctrl+c to quit)"
View Source
const SAVE_ACTION = "(ctrl+s to save)"

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	Choices  []string
	Cursor   int
	OnSelect func(string) tea.Cmd
}

func (*List) Init

func (l *List) Init() tea.Cmd

func (*List) Update

func (l *List) Update(msg tea.Msg) tea.Cmd

func (*List) View

func (l *List) View(header string) string

type TextArea

type TextArea struct {
	TextArea  textarea.Model
	OnConfirm func(string) tea.Cmd
}

func (*TextArea) Init

func (l *TextArea) Init(placeholder string) tea.Cmd

func (*TextArea) Update

func (l *TextArea) Update(msg tea.Msg) tea.Cmd

func (*TextArea) View

func (l *TextArea) View(format string, header ...any) string

type TextInput

type TextInput struct {
	TextInput textinput.Model
	OnConfirm func(string) tea.Cmd
}

func (*TextInput) Init

func (l *TextInput) Init(placeholder string) tea.Cmd

func (*TextInput) Update

func (l *TextInput) Update(msg tea.Msg) tea.Cmd

func (*TextInput) View

func (l *TextInput) View(format string, header ...any) string

Jump to

Keyboard shortcuts

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