widgets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTable

func RenderTable(columns []TableColumn, rows [][]string) []string

RenderTable renders rows to styled text lines using lipgloss/table.

func RenderTree

func RenderTree(root TreeNode) string

RenderTree renders children of root into an ASCII tree. It returns "(none)" when root has no children.

Types

type TableColumn

type TableColumn struct {
	Header   string
	MaxWidth int
}

TableColumn defines one reusable table column.

type TreeNode

type TreeNode struct {
	Label    string
	Children []TreeNode
}

TreeNode is a generic tree render node.

Jump to

Keyboard shortcuts

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