styles

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Status colors (Tailwind-based)
	ErrorColor   = lipgloss.Color("#dc2626") // red-600
	WarningColor = lipgloss.Color("#f97316") // orange-500
	InfoColor    = lipgloss.Color("#2563eb") // blue-600
	SuccessColor = lipgloss.Color("#16a34a") // green-600

	// Neutral colors with light/dark mode support
	MutedColor      = lipgloss.AdaptiveColor{Light: "#666666", Dark: "#888888"}
	TextColor       = lipgloss.AdaptiveColor{Light: "#333333", Dark: "#ffffff"}
	TextSubtleColor = lipgloss.AdaptiveColor{Light: "#999999", Dark: "#666666"}
)

Shared semantic colors - consistent across all themes. These colors follow user expectations for status indicators.

Functions

func NewBluelinkHuhTheme

func NewBluelinkHuhTheme() *huh.Theme

NewBluelinkHuhTheme creates a huh form theme using the Bluelink color scheme. Deprecated: Use NewHuhTheme with NewBluelinkPalette() instead.

func NewHuhTheme

func NewHuhTheme(palette ColorPalette) *huh.Theme

NewHuhTheme creates a huh form theme using the provided color palette.

Types

type BluelinkPalette

type BluelinkPalette struct{}

BluelinkPalette implements ColorPalette for the Bluelink CLI theme.

func NewBluelinkPalette

func NewBluelinkPalette() *BluelinkPalette

NewBluelinkPalette creates a new Bluelink color palette.

func (*BluelinkPalette) Error

func (*BluelinkPalette) Info

func (*BluelinkPalette) Muted

func (*BluelinkPalette) Name

func (p *BluelinkPalette) Name() string

func (*BluelinkPalette) Primary

func (p *BluelinkPalette) Primary() lipgloss.TerminalColor

func (*BluelinkPalette) Secondary

func (p *BluelinkPalette) Secondary() lipgloss.TerminalColor

func (*BluelinkPalette) Success

func (p *BluelinkPalette) Success() lipgloss.TerminalColor

func (*BluelinkPalette) Text

func (*BluelinkPalette) TextSubtle

func (p *BluelinkPalette) TextSubtle() lipgloss.TerminalColor

func (*BluelinkPalette) Warning

func (p *BluelinkPalette) Warning() lipgloss.TerminalColor

type CelerityPalette

type CelerityPalette struct{}

CelerityPalette implements ColorPalette for the Celerity CLI theme.

func NewCelerityPalette

func NewCelerityPalette() *CelerityPalette

NewCelerityPalette creates a new Celerity color palette.

func (*CelerityPalette) Error

func (*CelerityPalette) Info

func (*CelerityPalette) Muted

func (*CelerityPalette) Name

func (p *CelerityPalette) Name() string

func (*CelerityPalette) Primary

func (p *CelerityPalette) Primary() lipgloss.TerminalColor

func (*CelerityPalette) Secondary

func (p *CelerityPalette) Secondary() lipgloss.TerminalColor

func (*CelerityPalette) Success

func (p *CelerityPalette) Success() lipgloss.TerminalColor

func (*CelerityPalette) Text

func (*CelerityPalette) TextSubtle

func (p *CelerityPalette) TextSubtle() lipgloss.TerminalColor

func (*CelerityPalette) Warning

func (p *CelerityPalette) Warning() lipgloss.TerminalColor

type ColorPalette

type ColorPalette interface {
	// Name returns the theme identifier (e.g., "bluelink", "celerity").
	Name() string

	// Brand colors - these differ per theme
	Primary() lipgloss.TerminalColor
	Secondary() lipgloss.TerminalColor

	// Semantic colors - typically consistent across themes
	Error() lipgloss.TerminalColor
	Warning() lipgloss.TerminalColor
	Info() lipgloss.TerminalColor
	Success() lipgloss.TerminalColor

	// UI colors
	Muted() lipgloss.TerminalColor
	Text() lipgloss.TerminalColor
	TextSubtle() lipgloss.TerminalColor
}

ColorPalette defines the color scheme for a CLI theme. Themes must implement this interface to provide their brand colors.

type Styles

type Styles struct {
	Selected          lipgloss.Style
	SelectedListItem  lipgloss.Style
	Selectable        lipgloss.Style
	Title             lipgloss.Style
	ListItem          lipgloss.Style
	Pagination        lipgloss.Style
	Help              lipgloss.Style
	Success           lipgloss.Style
	Error             lipgloss.Style
	Warning           lipgloss.Style
	Info              lipgloss.Style
	Muted             lipgloss.Style
	Spinner           lipgloss.Style
	Category          lipgloss.Style
	Location          lipgloss.Style
	DiagnosticMessage lipgloss.Style
	DiagnosticAction  lipgloss.Style
	Header            lipgloss.Style
	SelectedNavItem   lipgloss.Style
	Hint              lipgloss.Style
	Key               lipgloss.Style
	// For displaying CLI commands (e.g. "bluelink deploy --name my-stack")
	Command lipgloss.Style
	Border  func(focused bool) lipgloss.Style

	// Palette provides access to the underlying colors for custom rendering.
	Palette ColorPalette
}

Styles holds the styles to be used across command TUI components. This is the theme-agnostic styles struct that works with any ColorPalette.

func NewDefaultStyles

func NewDefaultStyles(palette ColorPalette) *Styles

NewDefaultStyles creates a new instance of styles with the default renderer.

func NewStyles

func NewStyles(r *lipgloss.Renderer, palette ColorPalette) *Styles

NewStyles creates a new instance of styles using the provided color palette.

Jump to

Keyboard shortcuts

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