Documentation
¶
Overview ¶
Package picker provides a reusable interactive list picker built on bubbletea. It presents a list of string items with arrow-key navigation and returns the user's selection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCancelled = errors.New("selection cancelled")
ErrCancelled is returned when the user cancels the picker (Esc, q, or Ctrl+C).
View Source
var ErrNoItems = errors.New("no items to select from")
ErrNoItems is returned when the picker is invoked with an empty item list.
View Source
var ErrNotInteractive = errors.New(
"interactive selection requires a terminal (pass the value as an argument instead)",
)
ErrNotInteractive is returned when stdin is not a terminal.
View Source
var ErrUnexpectedModel = errors.New("unexpected model type from picker")
ErrUnexpectedModel is returned when the bubbletea program returns an unexpected model type.
Functions ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the bubbletea model for the picker. Exported for unit testing of Update/View logic.
Click to show internal directories.
Click to hide internal directories.