tui

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPromptInterrupt = errors.New("prompt interrupt")
)

Functions

This section is empty.

Types

type FormElement

type FormElement interface {
	Value() string
	Error() error
	tea.Model
}

type InputModel

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

func NewTextInput

func NewTextInput(prompt string) *InputModel

func (*InputModel) Error

func (m *InputModel) Error() error

func (*InputModel) Init

func (m *InputModel) Init() tea.Cmd

func (*InputModel) Update

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

func (*InputModel) Value

func (m *InputModel) Value() string

func (*InputModel) View

func (m *InputModel) View() string

func (*InputModel) WithValidation

func (m *InputModel) WithValidation(validator InputValidator) *InputModel

type InputValidator

type InputValidator func(string) error

type RunForm

type RunForm func(FormElement) (string, error)

func TeaRunFormWithOptions

func TeaRunFormWithOptions(opts ...tea.ProgramOption) RunForm

Jump to

Keyboard shortcuts

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