prompt

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TextInput

func TextInput(title, placeholder, help string) (string, error)

TextInput prompts the user for text input with a beautiful TUI

Types

type SearchSelectConfig

type SearchSelectConfig struct {
	Title       string
	Placeholder string
	Help        string
	LoadFunc    func() ([]SelectOption, error)
}

SearchSelect prompts the user to search and select from a dynamically loaded list

type SelectOption

type SelectOption struct {
	ID          string
	Title       string
	Description string
}

SelectOption represents an option in a selection list

func SearchSelect

func SearchSelect(config SearchSelectConfig) (*SelectOption, error)

SearchSelect prompts with search functionality and async loading

func Select

func Select(title string, options []SelectOption, help string) (*SelectOption, error)

Select prompts the user to select from a list of options

func (SelectOption) FilterValue

func (o SelectOption) FilterValue() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL