theme

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package theme provides centralized styling for the TUI application. Inspired by k9s, this provides a consistent visual language across all components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Colors

type Colors struct {
	// Primary colors
	Primary   lipgloss.Color // Main accent color (selection, active borders)
	Secondary lipgloss.Color // Secondary accent
	Accent    lipgloss.Color // Highlights, search, special items

	// Text colors
	Text      lipgloss.Color // Normal text
	TextDim   lipgloss.Color // Dimmed/secondary text
	TextMuted lipgloss.Color // Very dim text (hints, disabled)

	// Status colors
	Success lipgloss.Color // Success/completed
	Warning lipgloss.Color // In progress/warning
	Error   lipgloss.Color // Failed/error

	// Background colors
	BgPrimary   lipgloss.Color // Main background
	BgSecondary lipgloss.Color // Secondary background (bars, headers)
	BgHighlight lipgloss.Color // Highlighted items

	// Border colors
	Border       lipgloss.Color // Normal borders
	BorderActive lipgloss.Color // Active/focused borders
}

Colors defines the color palette for the application

func DefaultColors

func DefaultColors() Colors

DefaultColors returns the default color palette (dark theme)

type IconSet

type IconSet struct {
	Folder      string
	FolderOpen  string
	Workflow    string
	Pin         string
	Success     string
	Error       string
	InProgress  string
	Pending     string
	Search      string
	Filter      string
	Refresh     string
	RefreshAuto string
	Back        string
	Selected    string
	Unselected  string
}

IconSet defines the icons used throughout the app

func DefaultIcons

func DefaultIcons() IconSet

DefaultIcons returns the default icon set

type Theme

type Theme struct {
	Colors Colors

	// Pre-built styles for common elements
	Title        lipgloss.Style
	TitleActive  lipgloss.Style
	Subtitle     lipgloss.Style
	Text         lipgloss.Style
	TextDim      lipgloss.Style
	TextMuted    lipgloss.Style
	Selected     lipgloss.Style
	Cursor       lipgloss.Style
	StatusBar    lipgloss.Style
	HelpBar      lipgloss.Style
	Breadcrumb   lipgloss.Style
	BorderNormal lipgloss.Style
	BorderActive lipgloss.Style
	FilterInput  lipgloss.Style
	FilterPrompt lipgloss.Style

	// Status styles
	StatusSuccess    lipgloss.Style
	StatusWarning    lipgloss.Style
	StatusError      lipgloss.Style
	StatusInProgress lipgloss.Style

	// Icons
	Icons IconSet
}

Theme contains all styling for the application

func Default

func Default() *Theme

Default returns the default theme

func (*Theme) Divider

func (t *Theme) Divider(width int) string

Divider returns a horizontal divider line

func (*Theme) ItemPrefix

func (t *Theme) ItemPrefix(selected bool) string

ItemPrefix returns the cursor prefix for an item

func (*Theme) StatusIcon

func (t *Theme) StatusIcon(status, conclusion string) (string, lipgloss.Style)

StatusIcon returns the appropriate icon for a workflow status

Jump to

Keyboard shortcuts

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