list

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package list demonstrates a filterable list.Model as a single-screen app.

The list is deliberately long — far more rows than fit — so the scroll affordances are all reachable:

  • Drag the scrollbar thumb on the right edge, or click anywhere on its track to jump there. Every row is numbered, so the number under the cursor after a drag tells you whether the jump landed where the thumb says it should.
  • Roll the wheel over the list, focused or not.
  • g / G jump to the ends, ctrl+u / ctrl+d by half-pages.
  • Double-click a row to open it (the mouse spelling of enter, rule 14).
  • "/" filters; the filter is a row inside the pane rather than a separate box above it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

Types

type Screen

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

func (*Screen) Help

func (s *Screen) Help() []key.Binding

func (*Screen) HelpSections added in v0.25.0

func (s *Screen) HelpSections() []help.Section

HelpSections passes the list's own groups through and adds this screen's verbs. The scroll affordances join the list's Scroll group rather than this screen's, because that is what they do — mouse hints are grouped by verb like everything else (rule 10).

func (*Screen) Init

func (s *Screen) Init() tea.Cmd

func (*Screen) IsCapturingKeys

func (s *Screen) IsCapturingKeys() bool

func (*Screen) Layout

func (s *Screen) Layout() layout.Node

func (*Screen) OnEnter

func (s *Screen) OnEnter(any) tea.Cmd

func (*Screen) SetTheme

func (s *Screen) SetTheme(t theme.Theme)

func (*Screen) Title

func (s *Screen) Title() string

func (*Screen) Update

func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)

Jump to

Keyboard shortcuts

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