searchinput

package
v1.13.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is a styled search input box that renders above the main view, mirroring the command input (":") component.

func New

func New() *Model

New creates a new search input (inactive by default).

func (*Model) Confirm

func (m *Model) Confirm()

Confirm locks the search input into passive mode (query visible but not editable).

func (*Model) Editing

func (m *Model) Editing() bool

Editing reports whether the search input is in editing mode.

func (*Model) Hide

func (m *Model) Hide()

Hide deactivates the search input and resets its value.

func (*Model) Query

func (m *Model) Query() string

Query returns the current input value.

func (*Model) Resume

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

Resume transitions from passive back to active editing mode.

func (*Model) Show

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

Show activates the search input and returns a blink command.

func (*Model) Update

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

Update handles key messages while the search input is active.

func (*Model) View

func (m *Model) View() string

View renders the search input line. Returns "" when inactive.

func (*Model) Visible

func (m *Model) Visible() bool

Visible reports whether the search input is currently active.

type SearchClearedMsg

type SearchClearedMsg struct{}

SearchClearedMsg is emitted when the user cancels the search (Esc or backspace on an empty query). The active view should clear any filter.

type SearchQueryMsg

type SearchQueryMsg struct{ Query string }

SearchQueryMsg is emitted on every keystroke so the active view can apply the filter incrementally.

Jump to

Keyboard shortcuts

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