theme

package
v1.0.38686-pre Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconOK   = "✓"
	IconWarn = "⚠"
	IconFail = "✗"
)

Status icons. Keep these in one place so prompts, results, and JSON-text fallbacks all reach for the same glyph.

Variables

View Source
var (
	ColorAccent  = lipgloss.Color("205") // pink — in-progress state, focused input
	ColorSuccess = lipgloss.Color("42")  // green — completed actions
	ColorError   = lipgloss.Color("196") // red — failures
	ColorWarning = lipgloss.Color("220") // yellow — warnings, "press Y to confirm"
	ColorMuted   = lipgloss.Color("244") // gray — footer hints, less important text
)

Semantic color tokens. Use these instead of raw lipgloss.Color values so every widget speaks the same visual language, and a future palette swap only has to touch this file.

256-color codes are used (not hex) so terminals with reduced color depth degrade gracefully instead of falling back to white.

View Source
var (
	// TitleStyle is for prompt headings and emphasized labels. Bold, no color
	// so it works across light and dark terminals.
	TitleStyle = lipgloss.NewStyle().Bold(true)

	// AccentStyle is for active or in-progress UI: the spinner glyph, the
	// focused-input cursor accent, anything the user's eye should track.
	AccentStyle = lipgloss.NewStyle().Foreground(ColorAccent)

	// HelperStyle is for de-emphasized hint text — footers like
	// "(esc to quit)", inline shortcuts, secondary instructions.
	HelperStyle = lipgloss.NewStyle().Foreground(ColorMuted)

	// SuccessStyle / ErrorStyle / WarningStyle are for status glyphs and
	// short status words. Pair them with the icons below.
	SuccessStyle = lipgloss.NewStyle().Foreground(ColorSuccess)
	ErrorStyle   = lipgloss.NewStyle().Foreground(ColorError)
	WarningStyle = lipgloss.NewStyle().Foreground(ColorWarning)

	NoColorStyle = lipgloss.NewStyle().Foreground(lipgloss.NoColor{})
)

Style presets that combine the colors above with shared layout choices (bold/margins/etc). Widgets should reach for these before declaring a local style; only fork into a one-off style when the preset genuinely doesn't fit.

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