theme

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

View Source

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.

View Source
const Tagline = "Scaffold, manage, and stress test Go backends"

Tagline is the one-liner displayed beneath the logo on the welcome screen.

Variables

View Source
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.

View Source
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.

View Source
var ErrorStyle = lipgloss.NewStyle().
	Foreground(Error).
	Bold(true)

ErrorStyle is used for error messages, validation failures, and failure text.

View Source
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").

View Source
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.

View Source
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.

View Source
var MutedStyle = lipgloss.NewStyle().
	Foreground(Muted)

MutedStyle is a general-purpose style for de-emphasized content like descriptions, help text, and footer hints.

View Source
var SecondaryStyle = lipgloss.NewStyle().
	Foreground(Secondary).
	Bold(true)

SecondaryStyle is used for complementary highlighted content like selected values, active tags, and emphasized secondary information.

View Source
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.

View Source
var SubtleStyle = lipgloss.NewStyle().
	Foreground(Subtle)

SubtleStyle is used for very de-emphasized content like borders and separators.

View Source
var SuccessStyle = lipgloss.NewStyle().
	Foreground(Success).
	Bold(true)

SuccessStyle is used for success messages, checkmarks, and completion text.

View Source
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.

View Source
var ValueStyle = lipgloss.NewStyle().
	Foreground(Text)

ValueStyle is used for the right column in key-value displays. Light text for readability against dark backgrounds.

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL