Documentation ¶
Index ¶
- func Showcase()
- type Model
- func (m *Model) Canceled() bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) Quit() bool
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) View() string
- func (m *Model) WithCancel(cancelable bool) *Model
- func (m *Model) WithCharLimit(n int) *Model
- func (m *Model) WithCursorStyle(style lipgloss.Style) *Model
- func (m *Model) WithPlaceholder(s string) *Model
- func (m *Model) WithPrompt(s string) *Model
- func (m *Model) WithPromptStyle(style lipgloss.Style) *Model
- func (m *Model) WithQuit(quitable bool) *Model
- func (m *Model) WithSuggestion(suggestions []string) *Model
- func (m *Model) WithWidth(n int) *Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the model handling user input.
func (*Model) Update ¶
Update handles user input and updates the input state by processing key messages and updating the text input model accordingly.
func (*Model) View ¶
View renders the input widget as a string, displaying the prompt, text input, and help view for key bindings.
func (*Model) WithCancel ¶
WithCancel sets the cancelable flag and returns a new Model with the updated flag.
func (*Model) WithCharLimit ¶
WithCharLimit sets the maximum allowed number of input characters and returns a new Model with the updated character limit.
func (*Model) WithCursorStyle ¶
WithCursorStyle sets the style of the cursor for the text input model and returns a new Model with the updated cursor style.
func (*Model) WithPlaceholder ¶
WithPlaceholder sets the placeholder for the text input model and returns a new Model with the updated placeholder.
func (*Model) WithPrompt ¶
WithPrompt sets the prompt for the text input model and returns a new Model with the updated prompt.
func (*Model) WithPromptStyle ¶
WithPromptStyle sets the style of the prompt for the text input model and returns a new Model with the updated prompt style.
func (*Model) WithQuit ¶
WithQuit sets the quitable flag and returns a new Model with the updated flag.
func (*Model) WithSuggestion ¶
WithSuggestion sets the autocomplete suggestions for the text input model and returns a new Model with the updated suggestions.