Documentation
¶
Overview ¶
Package theme provides the centralized color palette, reusable lipgloss styles, and the ASCII art logo used throughout every TUI screen and component.
All colors are defined as lipgloss.Color constants so they can be referenced consistently across the entire application. Styles are exported as package-level variables so components and screens can use them directly without re-creating them.
This package is intentionally separated from the parent tui package to break import cycles: both tui/components and tui/screens import theme for styling, while the parent tui package imports screens to build the wizard. Keeping the theme in its own leaf package ensures a clean dependency graph.
The palette is intentionally vibrant — Nexus is a developer tool and its TUI should feel polished, modern, and enjoyable to use.
Index ¶
Constants ¶
const Logo = `` /* 714-byte string literal not displayed */
Logo is the Nexus ASCII art rendered in block characters. It is compact (6 lines) and designed to look sharp in both color and monochrome terminals.
const Tagline = "Scaffold, manage, and stress test Go backends"
Tagline is the one-liner displayed beneath the logo on the welcome screen.
Variables ¶
var ( // Primary is the vibrant accent color used for headings, active elements, // and the logo. Electric indigo. Primary = lipgloss.Color("#7C3AED") // Secondary is the softer accent used for taglines, selected items, and // complementary highlights. Cyan / teal. Secondary = lipgloss.Color("#06B6D4") // Success is used for checkmarks, completion messages, and positive // confirmation states. Green. Success = lipgloss.Color("#22C55E") // Warning is used for caution messages, "coming soon" notices, and // non-critical alerts. Amber. Warning = lipgloss.Color("#F59E0B") // Error is used for validation failures, error messages, and destructive // action highlights. Red. Error = lipgloss.Color("#EF4444") // Muted is used for secondary text, descriptions, and de-emphasized // content. Medium gray. Muted = lipgloss.Color("#6B7280") // Text is the default foreground for primary readable content. Light gray // that works well on dark terminal backgrounds. Text = lipgloss.Color("#E5E7EB") // Subtle is used for borders, separators, and very de-emphasized content. // Dim gray. Subtle = lipgloss.Color("#4B5563") )
These are the single source of truth for all TUI colors. Every component and screen must reference these constants rather than hard-coding hex values.
var BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(Primary). Padding(1, 2)
BoxStyle wraps content in a rounded border with padding. Used for summary panels, version output, and any content that benefits from visual grouping.
var ErrorStyle = lipgloss.NewStyle(). Foreground(Error). Bold(true)
ErrorStyle is used for error messages, validation failures, and failure text.
var HelpStyle = lipgloss.NewStyle(). Foreground(Subtle). Italic(true). PaddingTop(1)
HelpStyle is used for footer navigation hints shown at the bottom of interactive components (e.g., "↑/↓ navigate • space toggle • enter confirm").
var KeyStyle = lipgloss.NewStyle(). Foreground(Primary). Bold(true). Width(16). Align(lipgloss.Right). PaddingRight(1)
KeyStyle is used for the left column in key-value displays. Bold and primary colored with right-aligned text and fixed width for consistent alignment.
var LogoStyle = lipgloss.NewStyle(). Foreground(Primary). Bold(true)
LogoStyle renders the ASCII art logo in the primary color with bold weight. Used on the welcome screen and anywhere the branding needs to appear.
var MutedStyle = lipgloss.NewStyle(). Foreground(Muted)
MutedStyle is a general-purpose style for de-emphasized content like descriptions, help text, and footer hints.
var SecondaryStyle = lipgloss.NewStyle(). Foreground(Secondary). Bold(true)
SecondaryStyle is used for complementary highlighted content like selected values, active tags, and emphasized secondary information.
var SubtitleStyle = lipgloss.NewStyle(). Foreground(Muted). Italic(true)
SubtitleStyle is used for secondary headings and taglines beneath titles. Muted and italic to create visual hierarchy.
var SubtleStyle = lipgloss.NewStyle(). Foreground(Subtle)
SubtleStyle is used for very de-emphasized content like borders and separators.
var SuccessStyle = lipgloss.NewStyle(). Foreground(Success). Bold(true)
SuccessStyle is used for success messages, checkmarks, and completion text.
var TitleStyle = lipgloss.NewStyle(). Foreground(Primary). Bold(true). PaddingTop(1). PaddingBottom(1)
TitleStyle is used for section headings and screen titles. Bold, primary colored, with vertical padding to visually separate from surrounding content.
var ValueStyle = lipgloss.NewStyle(). Foreground(Text)
ValueStyle is used for the right column in key-value displays. Light text for readability against dark backgrounds.
var WarningStyle = lipgloss.NewStyle(). Foreground(Warning). Bold(true)
WarningStyle is used for warning messages and caution notices.
Functions ¶
This section is empty.
Types ¶
This section is empty.