style

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessIcon  = "✓"
	ErrorIcon    = "✗"
	WarningIcon  = "⚠"
	InfoIcon     = "ℹ"
	QuestionIcon = "?"
	ArrowIcon    = "→"
	BulletIcon   = "•"
	CheckIcon    = "✔"
	CrossIcon    = "✖"
)

Status icons

Variables

View Source
var (
	// Primary colors
	PrimaryColor   = lipgloss.Color("#7C3AED") // Purple
	SecondaryColor = lipgloss.Color("#06B6D4") // Cyan
	AccentColor    = lipgloss.Color("#F59E0B") // Amber

	// Status colors
	SuccessColor = lipgloss.Color("#10B981") // Green
	ErrorColor   = lipgloss.Color("#EF4444") // Red
	WarningColor = lipgloss.Color("#F59E0B") // Amber
	InfoColor    = lipgloss.Color("#3B82F6") // Blue

	// Text colors
	TextColor       = lipgloss.Color("#F3F4F6") // Light gray
	MutedColor      = lipgloss.Color("#9CA3AF") // Gray
	HighlightColor  = lipgloss.Color("#FBBF24") // Yellow
	DimColor        = lipgloss.Color("#6B7280") // Dark gray
	SubtleColor     = lipgloss.Color("#4B5563") // Darker gray
	BrightTextColor = lipgloss.Color("#FFFFFF") // White
)

Theme colors

View Source
var (
	// Text styles
	BoldStyle      = lipgloss.NewStyle().Bold(true)
	ItalicStyle    = lipgloss.NewStyle().Italic(true)
	UnderlineStyle = lipgloss.NewStyle().Underline(true)
	DimStyle       = lipgloss.NewStyle().Foreground(DimColor)
	MutedStyle     = lipgloss.NewStyle().Foreground(MutedColor)

	// Header styles
	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(PrimaryColor).
				MarginBottom(1)

	SubHeaderStyle = lipgloss.NewStyle().
					Bold(true).
					Foreground(SecondaryColor)

	// Status styles
	SuccessStyle = lipgloss.NewStyle().
					Foreground(SuccessColor).
					Bold(true)

	ErrorStyle = lipgloss.NewStyle().
				Foreground(ErrorColor).
				Bold(true)

	WarningStyle = lipgloss.NewStyle().
					Foreground(WarningColor).
					Bold(true)

	InfoStyle = lipgloss.NewStyle().
				Foreground(InfoColor).
				Bold(true)

	// Box styles
	BoxStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(PrimaryColor).
				Padding(1, 2)

	HighlightBoxStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(AccentColor).
						Padding(1, 2).
						Background(lipgloss.Color("#1F2937"))

	// Command styles
	CommandStyle = lipgloss.NewStyle().
					Foreground(AccentColor).
					Bold(true)

	FlagStyle = lipgloss.NewStyle().
				Foreground(InfoColor)

	ArgumentStyle = lipgloss.NewStyle().
					Foreground(HighlightColor).
					Italic(true)

	// List styles
	BulletStyle = lipgloss.NewStyle().
				Foreground(PrimaryColor).
				Bold(true)

	ListItemStyle = lipgloss.NewStyle().
					Foreground(TextColor).
					PaddingLeft(2)

	// Code/technical styles
	CodeStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("#A78BFA")).
				Background(lipgloss.Color("#1F2937")).
				Padding(0, 1)

	// Prompt styles
	PromptStyle = lipgloss.NewStyle().
				Foreground(PrimaryColor).
				Bold(true)

	InputStyle = lipgloss.NewStyle().
				Foreground(AccentColor)
)

Base styles

Functions

func Argument

func Argument(arg string) string

Argument renders an argument

func Bold

func Bold(msg string) string

Bold renders bold text

func Box

func Box(title, content string) string

Box renders text in a box

func Bullet

func Bullet(msg string) string

Bullet renders a bullet point

func Code

func Code(code string) string

Code renders code or technical text

func Colorize

func Colorize(msg string, color lipgloss.Color) string

Colorize applies a color to text

func Command

func Command(cmd string) string

Command renders a command name

func Dim

func Dim(msg string) string

Dim renders dimmed text

func Error

func Error(msg string) string

Error renders an error message

func Flag

func Flag(flag string) string

Flag renders a flag

func Header(msg string) string

Header renders a header

func HighlightBox

func HighlightBox(title, content string) string

HighlightBox renders text in a highlighted box

func Info

func Info(msg string) string

Info renders an info message

func Input

func Input(msg string) string

Input renders user input

func Italic

func Italic(msg string) string

Italic renders italic text

func Muted

func Muted(msg string) string

Muted renders muted text

func Prompt

func Prompt(msg string) string

Prompt renders a prompt

func SubHeader

func SubHeader(msg string) string

SubHeader renders a sub-header

func Success

func Success(msg string) string

Success renders a success message

func Underline

func Underline(msg string) string

Underline renders underlined text

func Warning

func Warning(msg string) string

Warning renders a warning message

func WithBackground

func WithBackground(msg string, fg, bg lipgloss.Color) string

WithBackground applies a background color to text

Types

This section is empty.

Jump to

Keyboard shortcuts

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