input

package
v1.0.57 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValueFunc

func GetValueFunc(model tea.Model) (string, error)

Types

type Model

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

func New

func New(opts ...Option) *Model

func (*Model) Focus

func (m *Model) Focus() tea.Cmd

func (*Model) Init

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

func (*Model) Resize

func (m *Model) Resize(width int)

func (*Model) Update

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

func (*Model) Value

func (m *Model) Value() string

func (*Model) View

func (m *Model) View() string

type Option

type Option = gn.Option[Model]

func WithHelpPlaceholder

func WithHelpPlaceholder() Option

func WithLabel

func WithLabel(label string) Option

func WithLabelStyle

func WithLabelStyle(style lipgloss.Style) Option

func WithMinMaxWidth

func WithMinMaxWidth(min, max int) Option

func WithPlaceholder

func WithPlaceholder(placeholder string) Option

func WithPlaceholderStyle

func WithPlaceholderStyle(style lipgloss.Style) Option

func WithPrompt

func WithPrompt(prompt string) Option

func WithPromptStyle

func WithPromptStyle(style lipgloss.Style) Option

func WithSetSuggestions

func WithSetSuggestions(suggestions []string) Option

func WithoutPrompt

func WithoutPrompt() Option

type RooKeymap

type RooKeymap struct {
	Quit   key.Binding
	Submit key.Binding
	Help   key.Binding
}

func DefaultRootKeymap

func DefaultRootKeymap() RooKeymap

type RootModel

type RootModel struct {
	*Model
	// contains filtered or unexported fields
}

func NewRoot

func NewRoot(ctx context.Context, opts ...Option) *RootModel

func (*RootModel) Err

func (r *RootModel) Err() error

func (*RootModel) HelpView

func (r *RootModel) HelpView() string

func (*RootModel) Init

func (r *RootModel) Init() tea.Cmd

func (*RootModel) Update

func (r *RootModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*RootModel) View

func (r *RootModel) View() string

Jump to

Keyboard shortcuts

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