Documentation
¶
Index ¶
- type CheckboxItem
- type CheckboxList
- func (c *CheckboxList) Blur()
- func (c *CheckboxList) CheckedItems() []CheckboxItem
- func (c *CheckboxList) CheckedValues() []any
- func (c *CheckboxList) Focus()
- func (c *CheckboxList) IsFocused() bool
- func (c *CheckboxList) Items() []CheckboxItem
- func (c *CheckboxList) SelectAll()
- func (c *CheckboxList) SelectNone()
- func (c *CheckboxList) SetChecked(index int, checked bool)
- func (c *CheckboxList) Toggle()
- func (c *CheckboxList) Update(msg tea.Msg) tea.Cmd
- func (c *CheckboxList) View() string
- func (c *CheckboxList) ViewHelp() string
- type Progress
- type RadioGroup
- func (r *RadioGroup) Blur()
- func (r *RadioGroup) Focus()
- func (r *RadioGroup) IsFocused() bool
- func (r *RadioGroup) Selected() int
- func (r *RadioGroup) SelectedOption() RadioOption
- func (r *RadioGroup) SetSelected(index int)
- func (r *RadioGroup) Update(msg tea.Msg) tea.Cmd
- func (r *RadioGroup) View() string
- type RadioOption
- type TextInput
- func (t *TextInput) Blur()
- func (t *TextInput) Focus() tea.Cmd
- func (t *TextInput) IsFocused() bool
- func (t *TextInput) SetValue(value string)
- func (t *TextInput) Update(msg tea.Msg) tea.Cmd
- func (t *TextInput) Value() string
- func (t *TextInput) View() string
- func (t *TextInput) ViewInline() string
- func (t *TextInput) WithMasked() *TextInput
- func (t *TextInput) WithPlaceholder(placeholder string) *TextInput
- func (t *TextInput) WithWidth(width int) *TextInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckboxItem ¶
type CheckboxItem struct {
Label string
Description string
Value any
Checked bool
Enabled bool // If false, item is shown but not selectable
}
CheckboxItem represents a single checkbox option
type CheckboxList ¶
type CheckboxList struct {
// contains filtered or unexported fields
}
CheckboxList manages a list of checkboxes with multi-selection
func NewCheckboxList ¶
func NewCheckboxList(items []CheckboxItem) *CheckboxList
NewCheckboxList creates a new checkbox list. Creates a copy of the items slice to avoid modifying the caller's data. Callers must explicitly set Enabled for each item.
func (*CheckboxList) CheckedItems ¶
func (c *CheckboxList) CheckedItems() []CheckboxItem
CheckedItems returns only the checked items
func (*CheckboxList) CheckedValues ¶
func (c *CheckboxList) CheckedValues() []any
CheckedValues returns the values of checked items
func (*CheckboxList) IsFocused ¶
func (c *CheckboxList) IsFocused() bool
IsFocused returns true if the checkbox list is focused
func (*CheckboxList) SelectAll ¶
func (c *CheckboxList) SelectAll()
SelectAll checks all enabled items
func (*CheckboxList) SetChecked ¶
func (c *CheckboxList) SetChecked(index int, checked bool)
SetChecked sets the checked state by index
func (*CheckboxList) Update ¶
func (c *CheckboxList) Update(msg tea.Msg) tea.Cmd
Update handles keyboard input
func (*CheckboxList) ViewHelp ¶
func (c *CheckboxList) ViewHelp() string
ViewHelp renders help text for the checkbox list
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress displays step progress
func NewProgress ¶
NewProgress creates a new progress indicator
func (*Progress) CurrentStep ¶
CurrentStep returns the current step index
func (*Progress) CurrentStepName ¶
CurrentStepName returns the name of the current step
func (*Progress) TotalSteps ¶
TotalSteps returns the total number of steps
func (*Progress) ViewCompact ¶
ViewCompact renders a compact progress indicator (single line)
type RadioGroup ¶
type RadioGroup struct {
// contains filtered or unexported fields
}
RadioGroup manages a group of radio buttons with single selection
func NewRadioGroup ¶
func NewRadioGroup(options []RadioOption) *RadioGroup
NewRadioGroup creates a new radio group with the given options
func NewRadioGroupSimple ¶
func NewRadioGroupSimple(labels []string) *RadioGroup
NewRadioGroupSimple creates a radio group from simple string labels
func (*RadioGroup) IsFocused ¶
func (r *RadioGroup) IsFocused() bool
IsFocused returns true if the radio group is focused
func (*RadioGroup) Selected ¶
func (r *RadioGroup) Selected() int
Selected returns the index of the selected option
func (*RadioGroup) SelectedOption ¶
func (r *RadioGroup) SelectedOption() RadioOption
SelectedOption returns the selected option
func (*RadioGroup) SetSelected ¶
func (r *RadioGroup) SetSelected(index int)
SetSelected sets the selected option by index
type RadioOption ¶
RadioOption represents a single radio button option
type TextInput ¶
type TextInput struct {
// contains filtered or unexported fields
}
TextInput wraps bubbletea's textinput with additional features
func NewTextInput ¶
NewTextInput creates a new text input with a label
func (*TextInput) ViewInline ¶
ViewInline renders the text input with label on the same line
func (*TextInput) WithMasked ¶
WithMasked enables password masking
func (*TextInput) WithPlaceholder ¶
WithPlaceholder sets the placeholder text