list

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	ID            int
	HeaderStyle   lipgloss.Style
	ItemStyle     lipgloss.Style
	SelectedStyle lipgloss.Style
	ItemRender    func(Option, bool) string

	Width  int
	Height int
	// contains filtered or unexported fields
}

func New

func New(opts []Option) Model

func NewWithGroups

func NewWithGroups(groups []OptionGroup) Model

func (*Model) Blur

func (m *Model) Blur()

func (*Model) Focus

func (m *Model) Focus()

func (*Model) Focused

func (m *Model) Focused() bool

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

type MsgOptionSelected

type MsgOptionSelected struct {
	ID     int
	Option Option
}

type Option

type Option struct {
	Label string
	Value any
}

type OptionGroup

type OptionGroup struct {
	Name    string
	Options []Option
}

Jump to

Keyboard shortcuts

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