table

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package table is an altered version of the original bubbles package for the table rendering https://github.com/charmbracelet/bubbles/tree/master/table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Title string
	Width int
}

type KeyMap

type KeyMap struct {
	LineUp     key.Binding
	LineDown   key.Binding
	PageUp     key.Binding
	PageDown   key.Binding
	GotoTop    key.Binding
	GotoBottom key.Binding
	MarkRow    key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns a default set of keybindings.

type Model

type Model struct {
	KeyMap KeyMap

	Help help.Model
	// contains filtered or unexported fields
}

func New

func New() Model

func (*Model) Columns

func (m *Model) Columns() []Column

func (*Model) Cursor

func (m *Model) Cursor() int

func (*Model) GotoBottom

func (m *Model) GotoBottom()

func (*Model) GotoTop

func (m *Model) GotoTop()

func (*Model) Height

func (m *Model) Height() int

func (*Model) MarkSelected added in v0.4.1

func (m *Model) MarkSelected()

func (*Model) MarkedRows added in v0.4.1

func (m *Model) MarkedRows() []Row

func (*Model) MoveDown

func (m *Model) MoveDown(n int)

func (*Model) MoveUp

func (m *Model) MoveUp(n int)

func (*Model) ResetMarked added in v0.4.1

func (m *Model) ResetMarked()

func (*Model) Rows

func (m *Model) Rows() []Row

func (*Model) SelectedRow

func (m *Model) SelectedRow() Row

func (*Model) SetColumns

func (m *Model) SetColumns(c []Column)

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 []Row)

func (*Model) SetStyles

func (m *Model) SetStyles(s Styles)

func (*Model) SetWidth

func (m *Model) SetWidth(w int)

func (*Model) ToggleMarkAll added in v0.8.0

func (m *Model) ToggleMarkAll()

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 Row

type Row []string

type Styles

type Styles struct {
	Header   lipgloss.Style
	Cell     lipgloss.Style
	Selected lipgloss.Style
	Marked   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