tui

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tui provides shared styles and components for CIDX terminal UIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorAccent  = lipgloss.Color("39")  // Blue -- titles, labels, active borders
	ColorText    = lipgloss.Color("255") // White -- primary text, values
	ColorSuccess = lipgloss.Color("42")  // Green -- passed, completed
	ColorError   = lipgloss.Color("196") // Red -- failed, errors, destructive
	ColorWarning = lipgloss.Color("214") // Orange -- warnings, pending checks
	ColorDim     = lipgloss.Color("241") // Gray -- help text, inactive, reviews pending
	ColorBorder  = lipgloss.Color("240") // Dark gray -- borders, subtle separators
	ColorPending = lipgloss.Color("33")  // Blue -- pending/in-progress
	ColorSelect  = lipgloss.Color("57")  // Purple -- selected item background
)

Color palette -- single source of truth for the CIDX design system.

View Source
var (
	Title = lipgloss.NewStyle().
			Bold(true).
			Foreground(ColorAccent).
			Padding(0, 1)

	Box = lipgloss.NewStyle().
		Border(lipgloss.RoundedBorder()).
		BorderForeground(ColorBorder).
		Padding(0, 1)

	ActiveBox = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(ColorAccent).
				Padding(0, 1)

	Help = lipgloss.NewStyle().
			Foreground(ColorDim).
			Padding(1, 0, 0, 0)
)

Layout styles -- structural elements reused across all TUIs.

View Source
var (
	Label = lipgloss.NewStyle().
			Foreground(ColorAccent).
			Bold(true)

	Value = lipgloss.NewStyle().
			Foreground(ColorText)

	Dim = lipgloss.NewStyle().
		Foreground(ColorDim)

	Success = lipgloss.NewStyle().
			Foreground(ColorSuccess)

	SuccessBold = lipgloss.NewStyle().
				Foreground(ColorSuccess).
				Bold(true)

	Error = lipgloss.NewStyle().
			Foreground(ColorError)

	ErrorBold = lipgloss.NewStyle().
				Foreground(ColorError).
				Bold(true)

	Warning = lipgloss.NewStyle().
			Foreground(ColorWarning)

	WarningBold = lipgloss.NewStyle().
				Foreground(ColorWarning).
				Bold(true)

	Pending = lipgloss.NewStyle().
			Foreground(ColorPending)

	Selected = lipgloss.NewStyle().
				Foreground(ColorAccent).
				Bold(true)

	Unselected = lipgloss.NewStyle().
				Foreground(ColorText)
)

Text styles -- semantic text rendering.

View Source
var (
	ListSelected = lipgloss.NewStyle().
					Background(ColorSelect).
					Foreground(ColorText).
					Bold(true)

	ListHeader = lipgloss.NewStyle().
				Foreground(ColorAccent).
				Bold(true)
)

List styles -- for interactive list/selection UIs.

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