styles

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Primary    = lipgloss.Color("#7C3AED") // Purple
	Secondary  = lipgloss.Color("#06B6D4") // Cyan
	Success    = lipgloss.Color("#10B981") // Green
	Warning    = lipgloss.Color("#F59E0B") // Orange
	Danger     = lipgloss.Color("#EF4444") // Red
	Muted      = lipgloss.Color("#6B7280") // Gray
	Text       = lipgloss.Color("#F3F4F6") // Light gray
	Background = lipgloss.Color("#1F2937") // Dark gray
	Border     = lipgloss.Color("#374151") // Medium gray
)

Color palette

View Source
var (
	// Title style for main headings
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(Primary).
				MarginBottom(1).
				PaddingLeft(2)

	// Subtitle style for section headings
	SubtitleStyle = lipgloss.NewStyle().
					Bold(true).
					Foreground(Secondary).
					MarginTop(1).
					PaddingLeft(2)

	// Regular text style
	TextStyle = lipgloss.NewStyle().
				Foreground(Text)

	// Muted text style for secondary information
	MutedStyle = lipgloss.NewStyle().
				Foreground(Muted).
				Italic(true)

	// Success message style
	SuccessStyle = lipgloss.NewStyle().
					Foreground(Success).
					Bold(true)

	// Warning message style
	WarningStyle = lipgloss.NewStyle().
					Foreground(Warning).
					Bold(true)

	// Error message style
	ErrorStyle = lipgloss.NewStyle().
				Foreground(Danger).
				Bold(true)

	// Box style for containers
	BoxStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(Border).
				Padding(1, 2)

	// Active box style (highlighted)
	ActiveBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(Primary).
					Padding(1, 2)

	// List item style
	ListItemStyle = lipgloss.NewStyle().
					PaddingLeft(2)

	// Selected list item style
	SelectedItemStyle = lipgloss.NewStyle().
						Foreground(Primary).
						Bold(true).
						PaddingLeft(1).
						SetString("► ")

	// Unselected list item style
	UnselectedItemStyle = lipgloss.NewStyle().
						Foreground(Muted).
						PaddingLeft(2).
						SetString("  ")

	// Status bar style
	StatusBarStyle = lipgloss.NewStyle().
					Foreground(Text).
					Background(Background).
					Padding(0, 1)

	// Help style
	HelpStyle = lipgloss.NewStyle().
				Foreground(Muted).
				Padding(1, 2)

	// Key binding style
	KeyStyle = lipgloss.NewStyle().
				Foreground(Primary).
				Bold(true)

	// Description style for key bindings
	DescStyle = lipgloss.NewStyle().
				Foreground(Muted)

	// Progress bar filled style
	ProgressFilledStyle = lipgloss.NewStyle().
						Foreground(Success).
						Background(Success)

	// Progress bar empty style
	ProgressEmptyStyle = lipgloss.NewStyle().
						Foreground(Border).
						Background(Border)

	// Table header style
	TableHeaderStyle = lipgloss.NewStyle().
						Bold(true).
						Foreground(Secondary).
						BorderStyle(lipgloss.NormalBorder()).
						BorderBottom(true).
						BorderForeground(Border)

	// Table cell style
	TableCellStyle = lipgloss.NewStyle().
					Padding(0, 1)

	// Highlighted table row
	HighlightedRowStyle = lipgloss.NewStyle().
						Background(lipgloss.Color("#2D3748")).
						Foreground(Primary)
)

Base styles

Functions

func Badge

func Badge(text string, color lipgloss.Color) string

Badge creates a styled badge

func DangerBadge

func DangerBadge(text string) string

DangerBadge creates a danger badge

func InfoBadge

func InfoBadge(text string) string

InfoBadge creates an info badge

func PrimaryBadge

func PrimaryBadge(text string) string

PrimaryBadge creates a primary badge

func Stat

func Stat(label, value string, color lipgloss.Color) string

Stat creates a styled statistic display

func StatDanger

func StatDanger(label, value string) string

StatDanger creates a danger-colored statistic

func StatInfo

func StatInfo(label, value string) string

StatInfo creates an info-colored statistic

func StatSuccess

func StatSuccess(label, value string) string

StatSuccess creates a success-colored statistic

func StatWarning

func StatWarning(label, value string) string

StatWarning creates a warning-colored statistic

func SuccessBadge

func SuccessBadge(text string) string

SuccessBadge creates a success badge

func WarningBadge

func WarningBadge(text string) string

WarningBadge creates a warning badge

Types

This section is empty.

Jump to

Keyboard shortcuts

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