Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanceled = errors.New("canceled")
ErrCanceled is returned when the user cancels an interactive selection.
Functions ¶
func MultiSelect ¶
func MultiSelect[T any]( title string, items []Item[T], theme huh.Theme, maxHeight int, showHelp bool, opts ...Option, ) ([]T, error)
MultiSelect presents a multi-select UI and returns the selected values. Returns ErrCanceled if the user cancels. Pass WithFilter to enable "/" filtering of the list.
Types ¶
type Option ¶
type Option func(*config)
Option configures a selection presented by MultiSelect.
func WithFilter ¶
func WithFilter() Option
WithFilter enables incremental filtering of the list: huh binds "/" to start filtering, typing narrows the visible items, and "esc" clears the filter. Off by default so short lists stay key-for-key simple.
Click to show internal directories.
Click to hide internal directories.