table

package
v0.0.0-...-e4556ce Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	LineUp   key.Binding
	LineDown key.Binding
	PageUp   key.Binding
	PageDown key.Binding
	ToTop    key.Binding
	ToBottom key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

type Model

type Model struct {
	KeyMap      KeyMap
	Title       string
	ScrollAhead int
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) Model

func (Model) AtBottom

func (m Model) AtBottom() bool

func (Model) AtTop

func (m Model) AtTop() bool

func (*Model) Blur

func (m *Model) Blur()

func (Model) Cursor

func (m Model) Cursor() int

func (*Model) Focus

func (m *Model) Focus()

func (Model) Focused

func (m Model) Focused() bool

func (Model) Height

func (m Model) Height() int

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) RowAtCursor

func (m Model) RowAtCursor() string

func (Model) Rows

func (m Model) Rows() []string

func (*Model) SetCursor

func (m *Model) SetCursor(n int)

func (*Model) SetHeight

func (m *Model) SetHeight(h int)

func (*Model) SetRows

func (m *Model) SetRows(r []string)

func (*Model) SetStyles

func (m *Model) SetStyles(s Styles)

func (*Model) SetWidth

func (m *Model) SetWidth(w int)

func (*Model) ToBottom

func (m *Model) ToBottom()

func (*Model) ToNext

func (m *Model) ToNext(n int)

func (*Model) ToPrevious

func (m *Model) ToPrevious(n int)

func (*Model) ToTop

func (m *Model) ToTop()

func (Model) Update

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

func (*Model) UpdateViewport

func (m *Model) UpdateViewport()

func (Model) View

func (m Model) View() string

func (Model) Width

func (m Model) Width() int

type Option

type Option func(*Model)

func WithFocused

func WithFocused(f bool) Option

func WithHeight

func WithHeight(h int) Option

func WithKeyMap

func WithKeyMap(km KeyMap) Option

func WithRows

func WithRows(rows []string) Option

func WithScrollAhead

func WithScrollAhead(a int) Option

func WithStyles

func WithStyles(s Styles) Option

func WithTitle

func WithTitle(t string) Option

func WithWidth

func WithWidth(w int) Option

type Styles

type Styles struct {
	Base   lipgloss.Style
	Title  lipgloss.Style
	Cell   lipgloss.Style
	Cursor lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

Jump to

Keyboard shortcuts

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