Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ SelectionUp: key.NewBinding( key.WithKeys("k", tea.KeyUp.String()), key.WithHelp("↑/k", "up"), ), SelectionDown: key.NewBinding( key.WithKeys("j", tea.KeyDown.String()), key.WithHelp("↓/j", "down"), ), PagePrev: key.NewBinding( key.WithKeys("h", tea.KeyLeft.String()), key.WithHelp("←/h", "prev"), ), PageNext: key.NewBinding( key.WithKeys("l", tea.KeyRight.String()), key.WithHelp("→/l", "next"), ), Quit: key.NewBinding( key.WithKeys("q", tea.KeyEsc.String(), tea.KeyCtrlC.String()), key.WithHelp("q", "quit"), ), Select: key.NewBinding( key.WithKeys(tea.KeySpace.String()), key.WithHelp("space", "select"), ), Enter: key.NewBinding(key.WithKeys(tea.KeyEnter.String())), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "help"), ), ToggleAll: key.NewBinding( key.WithKeys(tea.KeyTab.String()), key.WithHelp("tab", "all/none"), ), }
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct {
SelectionUp key.Binding
SelectionDown key.Binding
PageNext key.Binding
PagePrev key.Binding
Quit key.Binding
Select key.Binding
Help key.Binding
Enter key.Binding
ToggleAll key.Binding
}
type Model ¶
type Model struct {
PromptPrefix string
Prompt string
SelectedIndicator rune
ChooserIndicator rune
Styles Styles
Choices []string
KeyMap KeyMap
MaxSelections int
HideHelp bool
PerPage int
// contains filtered or unexported fields
}
Model represents the bubble tea model for the selection
func (*Model) SelectedIndexes ¶
func (*Model) SelectedValues ¶
type Styles ¶
type Styles struct {
PromptPrefix lipgloss.Style
Prompt lipgloss.Style
Text lipgloss.Style
SelectedIndicator lipgloss.Style
ChooserIndicator lipgloss.Style
}
Styles holds relevant styles used for rendering For an introduction to styling with Lip Gloss see: https://github.com/charmbracelet/lipgloss
Click to show internal directories.
Click to hide internal directories.