textinput

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT, Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoComplete

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

func NewAutoComplete

func NewAutoComplete(vx *vaxis.Vaxis, complete func(string) []string) *AutoComplete

func (*AutoComplete) Draw

func (a *AutoComplete) Draw(win vaxis.Window)

func (*AutoComplete) Update

func (a *AutoComplete) Update(msg vaxis.Event)
type MenuComplete struct {
	// contains filtered or unexported fields
}

func NewMenuComplete

func NewMenuComplete(complete func(string) []string) *MenuComplete
func (m *MenuComplete) Draw(win vaxis.Window)
func (m *MenuComplete) Update(msg vaxis.Event)

type Model

type Model struct {
	Content vaxis.Style
	Prompt  vaxis.Style
	// HideCursor tells the textinput not to draw the cursor
	HideCursor bool
	// contains filtered or unexported fields
}

func New

func New() *Model

func (*Model) Characters

func (m *Model) Characters() []vaxis.Character

Characters returns the characters of the content

func (*Model) CursorPosition

func (m *Model) CursorPosition() int

CursorPosition returns the cursor position, in characters. A cursor position of '0' means the cursor is at the beginning of the line

func (*Model) Draw

func (m *Model) Draw(win vaxis.Window)

func (*Model) SetContent

func (m *Model) SetContent(s string) *Model

func (*Model) SetInvisibleChar

func (m *Model) SetInvisibleChar(s string) *Model

SetInvisibleChar will use the first character of s to be displayed in the textinput field instead of the pressed keys (password mode).

func (*Model) SetPrompt

func (m *Model) SetPrompt(s string) *Model

func (*Model) String

func (m *Model) String() string

func (*Model) Update

func (m *Model) Update(msg vaxis.Event)

Jump to

Keyboard shortcuts

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