Documentation ¶
Index ¶
- type Group
- type Model
- func (m *Model[T]) Blur() *Model[T]
- func (m *Model[T]) Focus() *Model[T]
- func (m Model[T]) Focused() bool
- func (m *Model[T]) Height(i int) *Model[T]
- func (m *Model[T]) MoveDown(n int)
- func (m *Model[T]) MoveUp(n int)
- func (m Model[T]) Selected() *T
- func (m *Model[T]) SetGroups(groups []Group[T])
- func (m Model[T]) View() string
- func (m *Model[T]) Width(i int) *Model[T]
- type Option
- type Renderers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
func WithRenderers ¶
type Renderers ¶
type Renderers[T any] struct { Header func(string, int) string Item func(T, int) string Selected func(T, int) string }
For each group in the list the following occurs:
- Header is rendered
- Each item is rendered with item or selected depending on if it is the cursor
- Footer is rendered
If you don't want a header or footer, leave the function nil. If there are no items in the group it is skipped entirely.
Click to show internal directories.
Click to hide internal directories.