Documentation
¶
Index ¶
- func Choose(options []string, optFns ...func(*chooser) error) ([]string, error)
- func Input(prompt string) (string, error)
- func NewChooser(options []string, opts ...func(*chooser) error) (*chooser, error)
- func NewInputter() *inputter
- func WithCursorStyle(style lipgloss.Style) func(*chooser) error
- func WithItemStyle(style lipgloss.Style) func(*chooser) error
- func WithSelectedItemStyle(style lipgloss.Style) func(*chooser) error
- type CancelError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Choose ¶
Choose lets you prompt the user with a list of options and allows them to select one or more of them.
func NewChooser ¶
func NewInputter ¶
func NewInputter() *inputter
func WithCursorStyle ¶
WithCursorStyle sets the lipgloss Style for the rendered cursor. See https://github.com/charmbracelet/lipgloss.
func WithItemStyle ¶
WithItemStyle stes the lipgloss Style for non selected items in the list. See https://github.com/charmbracelet/lipgloss.
func WithSelectedItemStyle ¶
WithSelectedItemStyle stes the lipgloss Style for selected items in the list. See https://github.com/charmbracelet/lipgloss.
Types ¶
type CancelError ¶
type CancelError error
CancelError is returned when the user indicates they want the input to be cancelled, by using the escape or Control C inputs.
Click to show internal directories.
Click to hide internal directories.