Documentation
¶
Index ¶
- func NewStyledTable() *ltable.Table
- func NewStyledTableWithOptions(opts Options) *ltable.Table
- func SelectableTable(headers []string, rows [][]string, selectedIndex int) string
- func SelectableTableWithOptions(headers []string, rows [][]string, selectedIndex int, ...) string
- func SimpleTable(headers []string, rows [][]string) string
- func StatusTable(items [][]string) string
- type Builder
- func (b *Builder) Build() *ltable.Table
- func (b *Builder) WithBorder(bordered bool) *Builder
- func (b *Builder) WithHeaders(headers ...string) *Builder
- func (b *Builder) WithHeight(height int) *Builder
- func (b *Builder) WithRowNumbers(show bool) *Builder
- func (b *Builder) WithRows(rows ...[]string) *Builder
- func (b *Builder) WithTheme(t *theme.Theme) *Builder
- func (b *Builder) WithWidth(width int) *Builder
- type Options
- type SelectableTableOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStyledTable ¶
NewStyledTable creates a new lipgloss table with Grove's default styling
func NewStyledTableWithOptions ¶
NewStyledTableWithOptions creates a table with custom options
func SelectableTable ¶
SelectableTable creates a table suitable for selection interfaces The selection indicator (▶) is rendered on the right side of the table, outside the border
func SelectableTableWithOptions ¶
func SelectableTableWithOptions(headers []string, rows [][]string, selectedIndex int, opts SelectableTableOptions) string
SelectableTableWithOptions creates a table with custom highlighting options
func SimpleTable ¶
SimpleTable creates a basic table with headers and rows
func StatusTable ¶
StatusTable creates a table for displaying status information
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder provides a fluent interface for creating styled tables
func (*Builder) WithBorder ¶
WithBorder enables or disables the border
func (*Builder) WithHeaders ¶
WithHeaders sets the table headers
func (*Builder) WithHeight ¶
WithHeight sets the table height
func (*Builder) WithRowNumbers ¶
WithRowNumbers enables or disables row numbers
type Options ¶
type Options struct {
ShowRowNumbers bool
Bordered bool
HeaderStyle lipgloss.Style
RowStyle lipgloss.Style
Theme *theme.Theme
}
Options provides additional configuration for the table
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns the default table options
type SelectableTableOptions ¶
type SelectableTableOptions struct {
HighlightColumn int // Column index to highlight (0-based), -1 for no highlight
}
SelectableTableOptions provides configuration for SelectableTable