tui

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInput

func RunInput(question string) (string, error)

RunInput displays a text input prompt and returns the user's input

func RunSelection

func RunSelection(question string, options []string) (string, error)

Helper function to run the selection and return the chosen option

Types

type InputModel

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

InputModel manages the state for the text input

func InitialInputModel

func InitialInputModel(question string) InputModel

InitialInputModel creates a new input model with the given question

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) View

func (m InputModel) View() string

type SelectionModel

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

SelectionModel manages the state for the interactive selection

func InitialModel

func InitialModel(question string, choices []string) SelectionModel

InitialModel creates a new selection model with the given options and question

func (SelectionModel) Init

func (m SelectionModel) Init() tea.Cmd

func (SelectionModel) Update

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

func (SelectionModel) View

func (m SelectionModel) View() string

Jump to

Keyboard shortcuts

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