ui

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmModel

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

ConfirmModel manages the state for a confirmation prompt

func NewConfirmModel

func NewConfirmModel(prompt string, defaultValue bool) ConfirmModel

NewConfirmModel creates a new confirmation prompt model

func (ConfirmModel) Cancelled

func (m ConfirmModel) Cancelled() bool

Cancelled reports whether the user cancelled the confirmation prompt

func (ConfirmModel) Init

func (m ConfirmModel) Init() tea.Cmd

Init initializes the model

func (ConfirmModel) Result

func (m ConfirmModel) Result() bool

Result returns the confirmation result

func (ConfirmModel) Update

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

Update handles user input

func (ConfirmModel) View

func (m ConfirmModel) View() string

View renders the confirmation prompt

type InputModel

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

InputModel manages the state for a text input prompt

func NewInputModel

func NewInputModel(prompt, defaultValue string, isPassword bool) InputModel

NewInputModel creates a new input prompt model

func (InputModel) Cancelled

func (m InputModel) Cancelled() bool

Cancelled reports whether the user cancelled the input (Ctrl+C or Esc)

func (InputModel) Init

func (m InputModel) Init() tea.Cmd

Init initializes the model

func (InputModel) Update

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

Update handles user input

func (InputModel) Value

func (m InputModel) Value() string

Value returns the input value

func (InputModel) View

func (m InputModel) View() string

View renders the input prompt

type SelectModel

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

SelectModel manages the state for a select prompt

func NewSelectModel

func NewSelectModel(choices []string) SelectModel

NewSelectModel creates a new select prompt model

func (SelectModel) Cancelled

func (m SelectModel) Cancelled() bool

Cancelled reports whether the user cancelled the prompt (e.g., via Ctrl+C or q)

func (SelectModel) Init

func (m SelectModel) Init() tea.Cmd

Init initializes the model

func (SelectModel) Selected

func (m SelectModel) Selected() string

Selected returns the selected choice

func (SelectModel) Update

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

Update handles user input

func (SelectModel) View

func (m SelectModel) View() string

View renders the select prompt

Jump to

Keyboard shortcuts

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