vscroll

package
v1.3.103 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 4 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 {
	// contains filtered or unexported fields
}

Model is a virtualized scroll list that only renders visible items.

func New

func New(width, height int) Model

New creates a new Model with the given viewport dimensions.

func (Model) AppendItem

func (m Model) AppendItem(item string) Model

AppendItem adds one item to the end. If followBottom is true, the view auto-scrolls to show the new content.

func (Model) AtBottom

func (m Model) AtBottom() bool

AtBottom reports whether the viewport is scrolled to the bottom.

func (Model) GotoBottom

func (m Model) GotoBottom() Model

GotoBottom scrolls to the very bottom.

func (Model) GotoTop

func (m Model) GotoTop() Model

GotoTop scrolls to the very top.

func (Model) ItemCount

func (m Model) ItemCount() int

ItemCount returns the number of items.

func (Model) SetItems

func (m Model) SetItems(items []string) Model

SetItems replaces all items and returns the updated Model.

func (Model) SetSize

func (m Model) SetSize(width, height int) Model

SetSize returns a new Model with updated viewport dimensions.

func (Model) SetStyle

func (m Model) SetStyle(style lipgloss.Style) Model

SetStyle returns a new Model with the given lipgloss style applied.

func (Model) Update

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

Update handles keyboard and mouse messages for scrolling.

func (Model) View

func (m Model) View() string

View renders the visible window of the scroll list.

Jump to

Keyboard shortcuts

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