theme

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Borders

type Borders struct {
	Panel lipgloss.Border
}

Borders defines reusable border styles.

type Colors

type Colors struct {
	Primary    color.Color
	Secondary  color.Color
	Accent     color.Color
	Background color.Color
	Muted      color.Color
	Success    color.Color
	Error      color.Color
}

Colors holds the shared color palette used across the TUI.

type IconSet

type IconSet map[string]string

IconSet represents a collection of icons keyed by semantic usage.

type Option

type Option func(*Theme)

Option configures a Theme during construction.

func WithBorders

func WithBorders(borders Borders) Option

WithBorders overrides the border configuration.

func WithColors

func WithColors(colors Colors) Option

WithColors overrides the base color palette.

func WithIconSet

func WithIconSet(set IconSet) Option

WithIconSet overrides the icon set used by the theme.

func WithSpacing

func WithSpacing(spacing Spacing) Option

WithSpacing overrides the default spacing values.

type Spacing

type Spacing struct {
	PanelPadding   int
	PanelGap       int
	StatusHPadding int
}

Spacing captures commonly used spacing values.

type Theme

type Theme struct {
	// contains filtered or unexported fields
}

Theme centralizes palette, border, spacing, and icon configuration.

func Default

func Default() Theme

Default returns the default Theme configuration.

func New

func New(opts ...Option) Theme

New constructs a Theme with optional overrides applied.

func (Theme) Borders

func (t Theme) Borders() Borders

Borders exposes the theme border configuration.

func (Theme) Colors

func (t Theme) Colors() Colors

Colors exposes the theme color palette.

func (Theme) HeaderStyle

func (t Theme) HeaderStyle() lipgloss.Style

HeaderStyle returns the shared style used for primary headers.

func (Theme) Icon

func (t Theme) Icon(name string) string

Icon returns a themed icon with ASCII fallback if unavailable.

func (Theme) IconSet

func (t Theme) IconSet() IconSet

IconSet returns a defensive copy of the themed icon map.

func (Theme) PanelStyle

func (t Theme) PanelStyle() lipgloss.Style

PanelStyle returns the shared panel container style.

func (Theme) PanelTitleStyle

func (t Theme) PanelTitleStyle() lipgloss.Style

PanelTitleStyle returns the shared style for panel titles.

func (Theme) ProgressGradient

func (t Theme) ProgressGradient() []string

ProgressGradient returns the gradient colors for progress bars.

func (Theme) Spacing

func (t Theme) Spacing() Spacing

Spacing exposes the theme spacing configuration.

func (Theme) StatusBarStyle

func (t Theme) StatusBarStyle() lipgloss.Style

StatusBarStyle returns the shared style used for footer/status bars.

Jump to

Keyboard shortcuts

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