Documentation
¶
Index ¶
- func RenderKeybinds(keybinds []Keybind, theme styles.Theme) string
- func SimpleBox(content string, width int) string
- type Box
- type Footer
- type Header
- type Keybind
- type ProgressBar
- func (p ProgressBar) Render() string
- func (p ProgressBar) RenderCompact() string
- func (p ProgressBar) WithChars(filled, empty rune) ProgressBar
- func (p ProgressBar) WithShowText(show bool) ProgressBar
- func (p ProgressBar) WithStyle(style lipgloss.Style) ProgressBar
- func (p ProgressBar) WithWidth(width int) ProgressBar
- type Table
- type TableColumn
- type TableRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderKeybinds ¶
RenderKeybinds renders a list of keybindings.
Types ¶
type Box ¶
type Box struct {
Title string
TitleRight string
Content string
Width int
Height int
Style lipgloss.Style
// contains filtered or unexported fields
}
Box renders a bordered container with an optional title.
func (Box) WithContent ¶
WithContent sets the box content.
func (Box) WithTitleRight ¶
WithTitleRight sets the right-aligned title text (e.g., keybindings).
type Footer ¶
type Footer struct {
// contains filtered or unexported fields
}
Footer renders a styled keybindings bar.
type Header ¶
type Header struct {
Title string
Status string
StatusIcon string
StatusOk bool
Uptime time.Duration
Width int
Keybinds []Keybind
// contains filtered or unexported fields
}
Header renders a styled title bar with status and keybindings.
func (Header) WithKeybinds ¶
WithKeybinds sets the keybinding hints.
func (Header) WithStatus ¶
WithStatus sets the status text and icon.
func (Header) WithUptime ¶
WithUptime sets the uptime duration.
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar renders a horizontal progress bar with percentage.
func NewProgressBar ¶
func NewProgressBar(percent int) ProgressBar
NewProgressBar creates a new progress bar with the given percentage (0-100).
func (ProgressBar) Render ¶
func (p ProgressBar) Render() string
Render returns the rendered progress bar string.
func (ProgressBar) RenderCompact ¶
func (p ProgressBar) RenderCompact() string
RenderCompact returns a compact progress bar (e.g., for inline display).
func (ProgressBar) WithChars ¶
func (p ProgressBar) WithChars(filled, empty rune) ProgressBar
WithChars sets the characters used for filled and empty portions.
func (ProgressBar) WithShowText ¶
func (p ProgressBar) WithShowText(show bool) ProgressBar
WithShowText controls whether to show the percentage text.
func (ProgressBar) WithStyle ¶
func (p ProgressBar) WithStyle(style lipgloss.Style) ProgressBar
WithStyle sets the style for the filled portion.
func (ProgressBar) WithWidth ¶
func (p ProgressBar) WithWidth(width int) ProgressBar
WithWidth sets the width of the progress bar (not including percentage text).
type Table ¶
type Table struct {
Columns []TableColumn
Rows []TableRow
Cursor int
Width int
Height int
// contains filtered or unexported fields
}
Table renders a styled table with selection support.
func (Table) WithCursor ¶
WithCursor sets the selected row index.
type TableColumn ¶
TableColumn defines a column in the table.