styles

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package styles holds the single Styles struct that every TUI component draws with, built on lipgloss v2. Colors degrade automatically to the terminal's color profile at render time, and NO_COLOR strips them entirely so the TUI stays legible on monochrome terminals and in captured (golden) output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Styles

type Styles struct {
	// StatusBar frames the top status line (provider + scope).
	StatusBar lipgloss.Style
	// StatusKey styles a scope key label (e.g. "profile:").
	StatusKey lipgloss.Style
	// StatusValue styles a scope value (e.g. the account id).
	StatusValue lipgloss.Style
	// TabActive styles the selected tab.
	TabActive lipgloss.Style
	// TabInactive styles an unselected tab.
	TabInactive lipgloss.Style
	// Separator styles the horizontal rule between the tab bar and the page.
	Separator lipgloss.Style
	// PageHint styles the muted placeholder text inside a page.
	PageHint lipgloss.Style
	// HelpBar styles the bottom help line.
	HelpBar lipgloss.Style
	// Dialog styles a modal dialog box drawn over the page.
	Dialog lipgloss.Style

	// Pane frames a titled content pane (the list and detail boxes).
	Pane lipgloss.Style
	// PaneFocused frames the pane that currently holds keyboard focus, with an
	// accent border so the active pane reads as distinct from the idle one.
	PaneFocused lipgloss.Style
	// PaneTitle styles a pane's title line.
	PaneTitle lipgloss.Style
	// Selection styles the selected row in the pane that currently holds focus
	// (the active cursor).
	Selection lipgloss.Style
	// SelectionInactive styles the selected row in a pane that does NOT hold focus,
	// dimmed so the two panes never look equally selected at once.
	SelectionInactive lipgloss.Style
	// FieldLabel styles a metadata row label (e.g. "Version").
	FieldLabel lipgloss.Style
	// Banner styles the detail pane's staged-changes warning banner.
	Banner lipgloss.Style
	// ErrorText styles the page's error line.
	ErrorText lipgloss.Style

	// DiffHeader / DiffHunk / DiffAdded / DiffRemoved style the four diff line
	// classes in the diff page's viewport.
	DiffHeader  lipgloss.Style
	DiffHunk    lipgloss.Style
	DiffAdded   lipgloss.Style
	DiffRemoved lipgloss.Style
}

Styles is the flat set of lipgloss styles shared across the TUI. It is passed by value into components so there is one source of truth for the palette.

func New

func New() Styles

New builds the default Styles. When NO_COLOR is set the palette collapses to unstyled text (bold is kept for emphasis, which NO_COLOR does not govern), keeping the layout intact without any color escapes.

Jump to

Keyboard shortcuts

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