styles

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package styles contains the shared styles for the terminal UI components.

Index

Constants

View Source
const (
	Check  = "✔"
	Cross  = "✘"
	Git    = "\uf02a2" // 󰊢
	Folder = ""
	Dot    = "•"
)
View Source
const (
	ColorSuccess = "#22c55e"
	ColorError   = "#d75f6b"
	ColorSubtle  = "#a3a3a3"
)

Variables

View Source
var (
	Bold      = lipgloss.NewStyle().Bold(true).Render
	Padding   = lipgloss.NewStyle().PaddingLeft(1).Render
	Underline = lipgloss.NewStyle().Underline(true).Render

	Error   = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorError)).Render
	Success = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorSuccess)).PaddingLeft(1).Render
	Subtle  = lipgloss.NewStyle().Foreground(lipgloss.Color(ColorSubtle)).PaddingLeft(1).Render
)
View Source
var (
	ThemeColorCharm    = &ThemeColors{Base: "#7571F9", Light: "#F780E2"}
	ThemeColorDracula  = &ThemeColors{Base: "#6272a4", Light: "#F1FA8C"}
	ThemeColorsBase16  = &ThemeColors{Base: "6", Light: "3"}
	ThemeColorsDefault = &ThemeColors{
		Base:     "#5A82E0",
		BaseDark: "#758BF9",
		Light:    "#059669",
	}
)

Functions

func ErrorBox added in v0.3.0

func ErrorBox(title, message string) string

ErrorBox creates a bordered error box with title and message

Types

type RenderFunc

type RenderFunc func(string ...string) string

type ThemeColors

type ThemeColors struct {
	Base      string
	BaseDark  string
	Light     string
	LightDark string
	// contains filtered or unexported fields
}

func (*ThemeColors) BaseFn

func (t *ThemeColors) BaseFn(string ...string) string

func (*ThemeColors) Compile

func (t *ThemeColors) Compile() (base RenderFunc, light RenderFunc)

func (*ThemeColors) LightFn

func (t *ThemeColors) LightFn(string ...string) string

func (*ThemeColors) Styles

func (t *ThemeColors) Styles() (base lipgloss.Style, light lipgloss.Style)

Jump to

Keyboard shortcuts

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