input

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrMsg

type ErrMsg error

type Input

type Input struct {
	Program *tea.Program
	// contains filtered or unexported fields
}

func NewInput

func NewInput(opts ...TOption) (ipt *Input)

func (*Input) Run

func (that *Input) Run()

func (*Input) Value

func (that *Input) Value() string

type InputModel

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

func NewInputModel

func NewInputModel(opts ...TOption) (im *InputModel)

func (*InputModel) Focus

func (that *InputModel) Focus()

func (*InputModel) Init

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

func (*InputModel) Update

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

func (*InputModel) Value

func (that *InputModel) Value() string

func (*InputModel) View

func (that *InputModel) View() string

type TOption

type TOption func(ipm *InputModel)

func WithCharlimit

func WithCharlimit(cLimit int) TOption

func WithEchoChar

func WithEchoChar(echoChar string) TOption

func WithEchoMode

func WithEchoMode(echoMode textinput.EchoMode) TOption

func WithPlaceholder

func WithPlaceholder(pHolder string) TOption

func WithWidth

func WithWidth(width int) TOption

Jump to

Keyboard shortcuts

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