styles

package
v0.1.49 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HasDarkBackground = initDarkBackground()

	PrimaryColor = func() string {
		if HasDarkBackground {
			return "213"
		}
		return "53"
	}()

	SecondaryColor = "55"

	WarningColor = "214"

	// BorderColor is used for borders and dividers
	BorderColor = "240"

	// AccentColor is used for highlights and focus indicators
	AccentColor = "205"

	// SubtleBgColor is used for subtle background highlights
	SubtleBgColor = func() string {
		if HasDarkBackground {
			return "236"
		}
		return "254"
	}()

	// ErrorColor is used for error states
	ErrorColor = "196"

	// SuccessColor is used for success states
	SuccessColor = func() string {
		if HasDarkBackground {
			return "42"
		}
		return "34"
	}()

	// LinkColor is used for hyperlinks
	LinkColor = "32"
)
View Source
var (
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(lipgloss.Color(PrimaryColor)).
				MarginBottom(1)

	HeadingStyle = lipgloss.NewStyle().
					Bold(true).
					Foreground(lipgloss.Color(PrimaryColor))

	SuccessStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(SuccessColor))

	ErrorStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(ErrorColor))

	WarningStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(WarningColor))

	DimStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("245"))

	HelpStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("241"))

	// BorderDimStyle is used for borders and panel titles
	BorderDimStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(BorderColor))

	SelectedStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(AccentColor)).
					Bold(true)

	TableRowSelectedStyle lipgloss.Style

	BoxStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				Padding(1, 2)

	InfoBoxStyle = BoxStyle.
					BorderForeground(lipgloss.Color(PrimaryColor))

	WarningBoxStyle = BoxStyle.
					BorderForeground(lipgloss.Color(WarningColor))

	TextCenterStyle = lipgloss.NewStyle().Align(lipgloss.Center)

	InputStyle = lipgloss.NewStyle().
				BorderStyle(lipgloss.NormalBorder()).
				BorderForeground(lipgloss.Color(PrimaryColor))

	FocusedInputStyle = lipgloss.NewStyle().
						BorderStyle(lipgloss.NormalBorder()).
						BorderForeground(lipgloss.Color(AccentColor))

	TableHeaderStyle = lipgloss.NewStyle().
						BorderStyle(lipgloss.NormalBorder()).
						BorderForeground(lipgloss.Color(BorderColor)).
						BorderBottom(true).
						Bold(true).
						PaddingLeft(1).
						PaddingRight(1)

	TableCellStyle = lipgloss.NewStyle().
					PaddingLeft(1).
					PaddingRight(1)

	LinkStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(LinkColor)).
				Bold(true).
				Underline(true)

	// ScrollbarThumbStyle is for the scrollbar thumb/handle
	ScrollbarThumbStyle = lipgloss.NewStyle().
						Foreground(lipgloss.Color(PrimaryColor))

	// ScrollbarTrackStyle is for the scrollbar track
	ScrollbarTrackStyle = DimStyle
)

Functions

func HuhTheme added in v0.1.23

func HuhTheme() *huh.Theme

HuhTheme returns a huh theme using our style system

func NoColor

func NoColor() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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