Documentation ¶
Index ¶
- type ErrMsg
- type Input
- type InputList
- type InputModel
- func (that *InputModel) Blur()
- func (that *InputModel) Focus() tea.Cmd
- func (that *InputModel) Init() tea.Cmd
- func (that *InputModel) IsOption() bool
- func (that *InputModel) SetCursorMode(mode cursor.Mode) tea.Cmd
- func (that *InputModel) SetHelpStr(help string)
- func (that *InputModel) SetPromptStyle(style lipgloss.Style)
- func (that *InputModel) SetTextStyle(style lipgloss.Style)
- func (that *InputModel) SetValue(v string)
- func (that *InputModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (that *InputModel) Value() string
- func (that *InputModel) View() string
- type InputMultiModel
- func (that *InputMultiModel) AddOneInput(key string, opts ...MOption)
- func (that *InputMultiModel) AddOneOption(name string, values []string, opts ...MOption)
- func (that *InputMultiModel) Init() tea.Cmd
- func (that *InputMultiModel) SetInputPromptFormat(pattern string)
- func (that *InputMultiModel) SetSubmitCmd(scmd tea.Cmd)
- func (that *InputMultiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (that *InputMultiModel) Values() map[string]string
- func (that *InputMultiModel) View() string
- type Inputer
- type MOption
- func MWithCharlimit(cLimit int) MOption
- func MWithDefaultValue(v string) MOption
- func MWithEchoChar(echoChar string) MOption
- func MWithEchoMode(echoMode textinput.EchoMode) MOption
- func MWithPlaceholder(pHolder string) MOption
- func MWithPlaceholderStyle(style lipgloss.Style) MOption
- func MWithPrompt(prompt string) MOption
- func MWithWidth(width int) MOption
- type MultiInput
- type Option
- type OptionModel
- func (that *OptionModel) Blur()
- func (that *OptionModel) Focus() tea.Cmd
- func (that *OptionModel) IsOption() bool
- func (that *OptionModel) SetCursorMode(mode cursor.Mode) tea.Cmd
- func (that *OptionModel) SetPromptStyle(style lipgloss.Style)
- func (that *OptionModel) SetTextStyle(style lipgloss.Style)
- func (that *OptionModel) SetValue(v string)
- func (that *OptionModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (that *OptionModel) Value() string
- func (that *OptionModel) View() string
- type TOption
- func WithCharlimit(cLimit int) TOption
- func WithEchoChar(echoChar string) TOption
- func WithEchoMode(echoMode textinput.EchoMode) TOption
- func WithPlaceholder(pHolder string) TOption
- func WithPlaceholderStyle(style lipgloss.Style) TOption
- func WithPrompt(prompt string) TOption
- func WithWidth(width int) TOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
func (*Input) SetProgramOpts ¶
func (that *Input) SetProgramOpts(opts ...tea.ProgramOption)
type InputList ¶
type InputList struct {
// contains filtered or unexported fields
}
func NewInputList ¶
func NewInputList() (ipl *InputList)
func (*InputList) GetByIndex ¶
func (*InputList) GetNameByIndex ¶
type InputModel ¶
type InputModel struct {
// contains filtered or unexported fields
}
func NewInputModel ¶
func NewInputModel(opts ...TOption) (im *InputModel)
func (*InputModel) Blur ¶
func (that *InputModel) Blur()
func (*InputModel) Focus ¶
func (that *InputModel) Focus() tea.Cmd
func (*InputModel) Init ¶
func (that *InputModel) Init() tea.Cmd
func (*InputModel) IsOption ¶
func (that *InputModel) IsOption() bool
func (*InputModel) SetCursorMode ¶
func (that *InputModel) SetCursorMode(mode cursor.Mode) tea.Cmd
func (*InputModel) SetHelpStr ¶
func (that *InputModel) SetHelpStr(help string)
func (*InputModel) SetPromptStyle ¶
func (that *InputModel) SetPromptStyle(style lipgloss.Style)
func (*InputModel) SetTextStyle ¶
func (that *InputModel) SetTextStyle(style lipgloss.Style)
func (*InputModel) SetValue ¶
func (that *InputModel) SetValue(v string)
func (*InputModel) Value ¶
func (that *InputModel) Value() string
func (*InputModel) View ¶
func (that *InputModel) View() string
type InputMultiModel ¶
type InputMultiModel struct {
// contains filtered or unexported fields
}
func NewInputMultiModel ¶
func NewInputMultiModel() (imm *InputMultiModel)
func (*InputMultiModel) AddOneInput ¶
func (that *InputMultiModel) AddOneInput(key string, opts ...MOption)
func (*InputMultiModel) AddOneOption ¶
func (that *InputMultiModel) AddOneOption(name string, values []string, opts ...MOption)
func (*InputMultiModel) Init ¶
func (that *InputMultiModel) Init() tea.Cmd
func (*InputMultiModel) SetInputPromptFormat ¶
func (that *InputMultiModel) SetInputPromptFormat(pattern string)
func (*InputMultiModel) SetSubmitCmd ¶
func (that *InputMultiModel) SetSubmitCmd(scmd tea.Cmd)
func (*InputMultiModel) Values ¶
func (that *InputMultiModel) Values() map[string]string
func (*InputMultiModel) View ¶
func (that *InputMultiModel) View() string
type MOption ¶
func MWithCharlimit ¶
func MWithDefaultValue ¶
func MWithEchoChar ¶
func MWithEchoMode ¶
func MWithPlaceholder ¶
func MWithPlaceholderStyle ¶
func MWithPrompt ¶
func MWithWidth ¶
type MultiInput ¶
func NewMultiInput ¶
func NewMultiInput() (mipt *MultiInput)
func (*MultiInput) AddOneItem ¶
func (that *MultiInput) AddOneItem(key string, opts ...MOption)
func (*MultiInput) AddOneOption ¶
func (that *MultiInput) AddOneOption(name string, values []string, opts ...MOption)
func (*MultiInput) Run ¶
func (that *MultiInput) Run()
func (*MultiInput) SetProgramOpts ¶
func (that *MultiInput) SetProgramOpts(opts ...tea.ProgramOption)
func (*MultiInput) Values ¶
func (that *MultiInput) Values() map[string]string
type Option ¶
func (*Option) SetProgramOpts ¶
func (that *Option) SetProgramOpts(opts ...tea.ProgramOption)
type OptionModel ¶
type OptionModel struct { *InputModel ValueList []string Idx int }
func NewOptionModel ¶
func NewOptionModel(values []string, opts ...TOption) (om *OptionModel)
func (*OptionModel) Blur ¶
func (that *OptionModel) Blur()
func (*OptionModel) Focus ¶
func (that *OptionModel) Focus() tea.Cmd
func (*OptionModel) IsOption ¶
func (that *OptionModel) IsOption() bool
func (*OptionModel) SetCursorMode ¶
func (that *OptionModel) SetCursorMode(mode cursor.Mode) tea.Cmd
func (*OptionModel) SetPromptStyle ¶
func (that *OptionModel) SetPromptStyle(style lipgloss.Style)
func (*OptionModel) SetTextStyle ¶
func (that *OptionModel) SetTextStyle(style lipgloss.Style)
func (*OptionModel) SetValue ¶
func (that *OptionModel) SetValue(v string)
func (*OptionModel) Value ¶
func (that *OptionModel) Value() string
func (*OptionModel) View ¶
func (that *OptionModel) View() string
type TOption ¶
type TOption func(ipm *InputModel)
func WithCharlimit ¶
func WithEchoChar ¶
func WithEchoMode ¶
func WithPlaceholder ¶
func WithPlaceholderStyle ¶
func WithPrompt ¶
Click to show internal directories.
Click to hide internal directories.