theme

package
v1.0.45159-pre Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 — focused input
	ColorSecondary = lipgloss.Color("179") // gold — secondary labels (e.g. scope in a title)
	ColorRunning   = lipgloss.Color("39")  // blue — in-progress state
	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)

	// SecondaryStyle is for a secondary label that should read as distinct from
	// the primary accent without competing with it — e.g. the active scope
	// "(main branch)" appended to a picker title.
	SecondaryStyle = lipgloss.NewStyle().Foreground(ColorSecondary)

	// RunningStyle marks in-progress state (e.g. a running job's status glyph),
	// distinct from the pink accent used for focus/spinner.
	RunningStyle = lipgloss.NewStyle().Foreground(ColorRunning)

	// 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{})

	// SearchMatchStyle highlights every pager search hit; SearchSelectedStyle
	// marks the one the viewport is currently scrolled to (like the focused
	// match in less). Dark text on a colored background keeps hits legible
	// regardless of the underlying syntax color.
	SearchMatchStyle    = lipgloss.NewStyle().Foreground(lipgloss.Color("232")).Background(ColorWarning)
	SearchSelectedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("232")).Background(ColorAccent)
)

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