common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrimaryColor   = lipgloss.Color("212")
	SecondaryColor = lipgloss.Color("86")
	AccentColor    = lipgloss.Color("205")
	SuccessColor   = lipgloss.Color("82")
	WarningColor   = lipgloss.Color("214")
	ErrorColor     = lipgloss.Color("196")
	MutedColor     = lipgloss.Color("240")
	TextColor      = lipgloss.Color("252")
)

Colors

View Source
var (
	// Title styles
	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(PrimaryColor).
				MarginBottom(1)

	SubtitleStyle = lipgloss.NewStyle().
					Foreground(SecondaryColor).
					MarginBottom(1)

	// Input styles
	FocusedStyle = lipgloss.NewStyle().
					Foreground(PrimaryColor).
					Bold(true)

	BlurredStyle = lipgloss.NewStyle().
					Foreground(MutedColor)

	CursorStyle = lipgloss.NewStyle().
				Foreground(PrimaryColor)

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

	NormalItemStyle = lipgloss.NewStyle().
					Foreground(TextColor)

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

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

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

	// Help styles
	HelpStyle = lipgloss.NewStyle().
				Foreground(MutedColor).
				MarginTop(1)

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

	FocusedBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(PrimaryColor).
					Padding(1, 2)

	// Header styles
	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(PrimaryColor).
				Background(lipgloss.Color("236")).
				Padding(0, 1).
				Width(60)

	// Status bar
	StatusBarStyle = lipgloss.NewStyle().
					Foreground(TextColor).
					Background(lipgloss.Color("236")).
					Padding(0, 1)
)

Styles

Functions

func RenderHelp

func RenderHelp(keys ...string) string

RenderHelp creates a help text

func RenderPrompt

func RenderPrompt(prompt string, focused bool) string

RenderPrompt creates a styled prompt string

Types

This section is empty.

Jump to

Keyboard shortcuts

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