Documentation
¶
Index ¶
Constants ¶
View Source
const ( KeyCtrlC = "ctrl+c" KeyEnter = "enter" KeyEsc = "esc" )
Key constants map bubbletea key-press string representations to named values.
Variables ¶
Functions ¶
func NewSpinner ¶
Types ¶
type SelectModel ¶
type SelectModel struct {
// contains filtered or unexported fields
}
SelectModel is a single-choice picker rendered as a vertical list with a cursor (›) marking the focused option. ↑/↓ or k/j move; Enter confirms; Esc/Ctrl+C cancels.
func NewSelectModel ¶
func NewSelectModel(prompt string, options []string) SelectModel
func (SelectModel) Done ¶
func (m SelectModel) Done() bool
Done reports whether the user has confirmed a selection.
func (SelectModel) Init ¶
func (m SelectModel) Init() tea.Cmd
func (SelectModel) Selected ¶
func (m SelectModel) Selected() int
Selected returns the index chosen by the user. Only valid when Done().
func (SelectModel) View ¶
func (m SelectModel) View() tea.View
func (SelectModel) WithHint ¶
func (m SelectModel) WithHint(hint string) SelectModel
WithHint returns a copy of the model with a custom footer hint line.
type TokenModel ¶
type TokenModel struct {
// contains filtered or unexported fields
}
func NewTokenModel ¶
func NewTokenModel() TokenModel
func (TokenModel) Init ¶
func (m TokenModel) Init() tea.Cmd
func (TokenModel) Token ¶
func (m TokenModel) Token() string
func (TokenModel) View ¶
func (m TokenModel) View() tea.View
Click to show internal directories.
Click to hide internal directories.