scrollbar

package
v1.95.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Width = 1

Width is the intrinsic width of the scrollbar component in terminal columns.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New() *Model

func (*Model) GetScrollOffset

func (m *Model) GetScrollOffset() int

func (*Model) IsDragging

func (m *Model) IsDragging() bool

func (*Model) PageDown

func (m *Model) PageDown() tea.Cmd

func (*Model) PageUp

func (m *Model) PageUp() tea.Cmd

func (*Model) ScrollDown

func (m *Model) ScrollDown() tea.Cmd

func (*Model) ScrollUp

func (m *Model) ScrollUp() tea.Cmd

func (*Model) SetDimensions

func (m *Model) SetDimensions(viewHeight, totalHeight int)

func (*Model) SetPosition

func (m *Model) SetPosition(x, y int)

func (*Model) SetScrollOffset

func (m *Model) SetScrollOffset(offset int)

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

func (*Model) ViewLines added in v1.95.0

func (m *Model) ViewLines() []string

ViewLines returns the rendered scrollbar as one string per track line. The returned slice is shared with the internal cache and must not be mutated. Returns nil when no scrollbar is needed.

Jump to

Keyboard shortcuts

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