Help us shape the future of Go! Take the 2026 Go Developer Survey

styles

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Primary   = lipgloss.Color("#7D56F4")
	Secondary = lipgloss.Color("#383838")
	Accent    = lipgloss.Color("#73F59F")
	Error     = lipgloss.Color("#F25D94")
	Success   = lipgloss.Color("#10B981")
	Warning   = lipgloss.Color("#F59E0B")
	Info      = lipgloss.Color("#3B82F6")

	// Backgrounds
	BgBase    = lipgloss.Color("#1A1A2E")
	BgSubtle  = lipgloss.Color("#16213E")
	BgOverlay = lipgloss.Color("#0F3460")

	// Foregrounds
	FgBase   = lipgloss.Color("#EAEAEA")
	FgMuted  = lipgloss.Color("#A0A0A0")
	FgSubtle = lipgloss.Color("#666666")
)

Semantic color palette

Functions

func FrameTable

func FrameTable(v string) string

FrameTable wraps a bubbles/table view in a rounded border so detail-page tables read as framed tables (matching the main page's evertras look) instead of bare rows floating beside the content pane's own border. The wrapped view is 2 cells wider and taller than v, so size the table to (contentWidth-2) before framing to avoid overflowing the pane.

Types

type FooterStyles

type FooterStyles struct {
	Base lipgloss.Style
	Key  lipgloss.Style
	Help lipgloss.Style
}

type HeaderStyles

type HeaderStyles struct {
	Title    lipgloss.Style
	Subtitle lipgloss.Style
	Resource lipgloss.Style
}

type HelpStyles

type HelpStyles struct {
	Title   lipgloss.Style
	Key     lipgloss.Style
	Desc    lipgloss.Style
	Section lipgloss.Style
}

type ModalStyles

type ModalStyles struct {
	Box     lipgloss.Style
	Title   lipgloss.Style
	Content lipgloss.Style
}
type NavigationStyles struct {
	Breadcrumb lipgloss.Style
	Separator  lipgloss.Style
	Active     lipgloss.Style
}

type SearchStyles

type SearchStyles struct {
	Prompt lipgloss.Style
	Input  lipgloss.Style
	Help   lipgloss.Style
}

type SidebarStyles

type SidebarStyles struct {
	Title    lipgloss.Style
	Section  lipgloss.Style
	Item     lipgloss.Style
	Selected lipgloss.Style
}

type StatusStyles

type StatusStyles struct {
	Info    lipgloss.Style
	Success lipgloss.Style
	Warning lipgloss.Style
	Error   lipgloss.Style
}

type Styles

type Styles struct {
	// Current theme
	CurrentTheme ThemeType

	// Text styles
	Base   lipgloss.Style
	Muted  lipgloss.Style
	Header lipgloss.Style
	Error  lipgloss.Style

	// Component styles
	HeaderStyle     HeaderStyles
	SidebarStyle    SidebarStyles
	FooterStyle     FooterStyles
	TableStyle      TableStyles
	SearchStyle     SearchStyles
	ModalStyle      ModalStyles
	StatusStyle     StatusStyles
	HelpStyle       HelpStyles
	NavigationStyle NavigationStyles
}

Styles contains all application-wide styles

func DefaultStyles

func DefaultStyles() *Styles

DefaultStyles returns the default application styles

func (*Styles) ApplyTheme

func (s *Styles) ApplyTheme(theme Theme)

ApplyTheme applies a theme to the Styles struct

func (*Styles) GetTheme

func (s *Styles) GetTheme() ThemeType

GetTheme returns the current theme type

func (*Styles) SetTheme

func (s *Styles) SetTheme(themeType ThemeType)

SetTheme sets a specific theme

func (*Styles) ToggleTheme

func (s *Styles) ToggleTheme()

ToggleTheme switches between dark and light themes

type TableStyles

type TableStyles struct {
	Header   lipgloss.Style
	Row      lipgloss.Style
	Selected lipgloss.Style
}

type Theme

type Theme struct {
	// Theme name
	Name ThemeType

	// Primary colors
	Primary   lipgloss.Color
	Secondary lipgloss.Color
	Accent    lipgloss.Color
	Error     lipgloss.Color
	Success   lipgloss.Color
	Warning   lipgloss.Color
	Info      lipgloss.Color

	// Backgrounds
	BgBase    lipgloss.Color
	BgSubtle  lipgloss.Color
	BgOverlay lipgloss.Color

	// Foregrounds
	FgBase   lipgloss.Color
	FgMuted  lipgloss.Color
	FgSubtle lipgloss.Color
}

Theme defines a complete color theme

func DarkThemeColors

func DarkThemeColors() Theme

DarkThemeColors returns the dark theme color palette

func DefaultTheme

func DefaultTheme() Theme

DefaultTheme returns the default theme (dark)

func GetTheme

func GetTheme(themeType ThemeType) Theme

GetTheme returns the theme for a given theme type

func LightThemeColors

func LightThemeColors() Theme

LightThemeColors returns the light theme color palette

type ThemeType

type ThemeType string

ThemeType represents the type of theme

const (
	// DarkTheme is the default dark theme
	DarkTheme ThemeType = "dark"

	// LightTheme is the light theme option
	LightTheme ThemeType = "light"
)

Jump to

Keyboard shortcuts

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