Versions in this module Expand all Collapse all v1 v1.22.0 Feb 9, 2026 Changes in this version + type Model struct + func New(opts ...Option) *Model + func (m *Model) ContentWidth() int + func (m *Model) EnsureLineVisible(line int) + func (m *Model) EnsureRangeVisible(startLine, endLine int) + func (m *Model) IsDragging() bool + func (m *Model) LineDown() + func (m *Model) LineUp() + func (m *Model) NeedsScrollbar() bool + func (m *Model) PageDown() + func (m *Model) PageUp() + func (m *Model) ReservedCols() int + func (m *Model) ScrollBy(delta int) + func (m *Model) ScrollOffset() int + func (m *Model) ScrollToBottom() + func (m *Model) ScrollToTop() + func (m *Model) ScrollbarX() int + func (m *Model) SetContent(lines []string, totalHeight int) + func (m *Model) SetPosition(x, y int) + func (m *Model) SetScrollOffset(offset int) + func (m *Model) SetSize(width, height int) + func (m *Model) Update(msg tea.Msg) (handled bool, cmd tea.Cmd) + func (m *Model) UpdateMouse(msg tea.Msg) (handled bool, cmd tea.Cmd) + func (m *Model) View() string + func (m *Model) ViewWithLines(visibleLines []string) string + func (m *Model) VisibleHeight() int + type Option func(*Model) + func WithGapWidth(n int) Option + func WithKeyMap(km *ScrollKeyMap) Option + func WithReserveScrollbarSpace(v bool) Option + func WithWheelStep(n int) Option + type ScrollKeyMap struct + Bottom key.Binding + Down key.Binding + PageDown key.Binding + PageUp key.Binding + Top key.Binding + Up key.Binding + func DefaultScrollKeyMap() *ScrollKeyMap + func ReadOnlyScrollKeyMap() *ScrollKeyMap