components

package
v1.0.37475-pre Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 6 Imported by: 0

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

View Source
var LinkStyle = lipgloss.NewStyle().
	Foreground(lipgloss.Color("#00ADD8")).
	Underline(true)

Functions

func NewSpinner

func NewSpinner(color bool) spinner.Model

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) Update

func (m SelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

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) Update

func (m TokenModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TokenModel) View

func (m TokenModel) View() tea.View

Jump to

Keyboard shortcuts

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