Documentation
¶
Overview ¶
Package table provides a themed table component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model wraps lipgloss/table with theme-aware styling.
type Option ¶
type Option func(*Model)
Option configures a table.
func WithBackground ¶
WithBackground sets the background color for cells and borders. Needed because lipgloss table resets ANSI styles between cells, so a parent container's background doesn't propagate through.
func WithFitHeaders ¶
func WithFitHeaders() Option
WithFitHeaders truncates column headers to the widest value in each column, with a minimum width of 5. Use WithMinHeaderWidth to override the minimum.
func WithMaxValueWidth ¶
WithMaxValueWidth sets the maximum width for cell values. Values wider than this are truncated with an ellipsis. Default is 20.
func WithMinHeaderWidth ¶
WithMinHeaderWidth sets the minimum header width when FitHeaders is enabled.