Documentation
¶
Overview ¶
Package styles provides styling for the Lux TUI using lipgloss.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Primary = lipgloss.Color("#7C3AED") // Purple Secondary = lipgloss.Color("#3B82F6") // Blue Success = lipgloss.Color("#10B981") // Green Warning = lipgloss.Color("#F59E0B") // Amber Error = lipgloss.Color("#EF4444") // Red Muted = lipgloss.Color("#6B7280") // Gray Text = lipgloss.Color("#F9FAFB") // Light text Border = lipgloss.Color("#374151") // Dark gray )
Colors
View Source
var ( // Title style TitleStyle = lipgloss.NewStyle(). Bold(true). Foreground(Primary). MarginBottom(1) // Tab styles TabStyle = lipgloss.NewStyle(). Padding(0, 2). Foreground(Muted) ActiveTabStyle = lipgloss.NewStyle(). Padding(0, 2). Foreground(Text). Background(Primary). Bold(true) FooterStyle = lipgloss.NewStyle(). Foreground(Muted). MarginTop(1) // Error style ErrorStyle = lipgloss.NewStyle(). Foreground(Error). Bold(true) // Success style SuccessStyle = lipgloss.NewStyle(). Foreground(Success) // Warning style WarningStyle = lipgloss.NewStyle(). Foreground(Warning) // Spinner style SpinnerStyle = lipgloss.NewStyle(). Foreground(Primary) // Box style BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(Border). Padding(1, 2) // Table header style TableHeaderStyle = lipgloss.NewStyle(). Bold(true). Foreground(Primary). BorderBottom(true). BorderStyle(lipgloss.NormalBorder()). BorderForeground(Border) // Table row style TableRowStyle = lipgloss.NewStyle(). Padding(0, 1) // Selected row style SelectedRowStyle = lipgloss.NewStyle(). Background(Primary). Foreground(Text). Bold(true) // Status styles StatusHealthy = lipgloss.NewStyle(). Foreground(Success). Bold(true) StatusUnhealthy = lipgloss.NewStyle(). Foreground(Error). Bold(true) StatusPending = lipgloss.NewStyle(). Foreground(Warning) // Label style LabelStyle = lipgloss.NewStyle(). Foreground(Muted) // Value style ValueStyle = lipgloss.NewStyle(). Foreground(Text). Bold(true) // Section title style SectionTitleStyle = lipgloss.NewStyle(). Foreground(Secondary). Bold(true). MarginTop(1). MarginBottom(1) // MutedStyle for subdued text rendering MutedStyle = lipgloss.NewStyle(). Foreground(Muted) )
Component styles
Functions ¶
func CenterText ¶
CenterText centers text within a given width
func FormatStatus ¶
FormatStatus formats a status with appropriate styling
func StatusStyle ¶
StatusStyle returns the appropriate style for a status string
Types ¶
type LogLevelStyle ¶
LogLevelStyle is a wrapper for log level styling
func (LogLevelStyle) Render ¶
func (l LogLevelStyle) Render(text string) string
Render renders text with this style
Click to show internal directories.
Click to hide internal directories.