API
searchbar
import "github.com/aschey/bubbleprompt/searchbar"
Index
- type Model
- func New[T any](inputHandler prompt.InputHandler[T], textInput input.Input[T], contentModel tea.Model, options ...Option[T]) Model[T]
- func (m Model[T]) BaseView() string
- func (m Model[T]) Body() string
- func (m Model[T]) Init() tea.Cmd
- func (m Model[T]) Input() string
- func (m Model[T]) OverlayView() string
- func (m Model[T]) OverlayX() int
- func (m Model[T]) OverlayY() int
- func (m Model[T]) PromptModel() *prompt.Model[T]
- func (m Model[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model[T]) View() string
- type Option
type Model
type Model[T any] struct {
// contains filtered or unexported fields
}
func New
func New[T any](inputHandler prompt.InputHandler[T], textInput input.Input[T], contentModel tea.Model, options ...Option[T]) Model[T]
func (Model[T]) BaseView
func (m Model[T]) BaseView() string
func (Model[T]) Body
func (m Model[T]) Body() string
func (Model[T]) Init
func (m Model[T]) Init() tea.Cmd
func (Model[T]) Input
func (m Model[T]) Input() string
func (Model[T]) OverlayView
func (m Model[T]) OverlayView() string
func (Model[T]) OverlayX
func (m Model[T]) OverlayX() int
func (Model[T]) OverlayY
func (m Model[T]) OverlayY() int
func (Model[T]) PromptModel
func (m Model[T]) PromptModel() *prompt.Model[T]
func (Model[T]) Update
func (m Model[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (Model[T]) View
func (m Model[T]) View() string
type Option
type Option[T any] func(settings *searchbarSettings[T])
func WithLabel
func WithLabel[T any](label string) Option[T]
func WithMaxWidth
func WithMaxWidth[T any](maxWidth int) Option[T]
func WithPromptOptions
func WithPromptOptions[T any](options ...prompt.Option[T]) Option[T]
func WithSearchbarStyle
func WithSearchbarStyle[T any](searchbarStyle lipgloss.Style) Option[T]
Generated by gomarkdoc