Documentation
¶
Overview ¶
Package input provides the Input Box component with focus state handling. This component wraps a bubble tea textarea in a bordered container with dynamic border colors based on focus state.
Index ¶
- func New() tea.Model
- type InputBox
- func (m *InputBox) BindingKeys() []key.Binding
- func (m *InputBox) Blur()
- func (m *InputBox) Focus()
- func (m *InputBox) Focused() bool
- func (m *InputBox) GetMode() InputMode
- func (m *InputBox) GetSize() (int, int)
- func (m *InputBox) Init() tea.Cmd
- func (m *InputBox) Reset()
- func (m *InputBox) SetMode(mode InputMode)
- func (m *InputBox) SetShowHints(show bool)
- func (m *InputBox) SetSize(width, height int)
- func (m *InputBox) SetValue(value string)
- func (m *InputBox) TextArea() textarea.Model
- func (m *InputBox) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *InputBox) Value() string
- func (m *InputBox) View() string
- type InputBoxKeyMaps
- type InputMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InputBox ¶
type InputBox struct {
// contains filtered or unexported fields
}
InputBox is a Bubble Tea model that wraps a textarea in a bordered container with focus state handling.
func (*InputBox) BindingKeys ¶
BindingKeys returns the key bindings for the InputBox.
func (*InputBox) SetShowHints ¶
SetShowHints controls whether to show the hints bar.
type InputBoxKeyMaps ¶
type InputBoxKeyMaps struct {
Send key.Binding
Multiline key.Binding
Clear key.Binding
Escape key.Binding
}
InputBoxKeyMaps defines key bindings for the InputBox.
func DefaultInputBoxKeyMaps ¶
func DefaultInputBoxKeyMaps() InputBoxKeyMaps
DefaultInputBoxKeyMaps returns the default key bindings.
Click to show internal directories.
Click to hide internal directories.