scrollbar

package
v1.164.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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