Documentation
¶
Overview ¶
Package theme provides centralized styling and theming functionality
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListInstalled ¶
ListInstalled returns a list of available theme names.
Types ¶
type AdaptiveColor ¶
AdaptiveColor supports both light and dark theme variants.
type AppStyles ¶
type AppStyles struct {
Input InputStyles
List list.Styles
ListDelegate list.DefaultItemStyles
ListHelp help.Styles
EditForm EditForm
ListExtra ListExtraStyles
}
AppStyles contains all computed styles for the application.
type ColorsList ¶
type ColorsList struct {
TextColor AdaptiveColor `json:"textColor"`
TextColorError AdaptiveColor `json:"textColorError"`
TextColorReadonly AdaptiveColor `json:"textColorReadonly"`
TextColorSelected1 AdaptiveColor `json:"textColorSelected1"`
TextColorSelected2 AdaptiveColor `json:"textColorSelected2"`
TextColorTitle AdaptiveColor `json:"textColorTitle"`
BackgroundColorTitle AdaptiveColor `json:"backgroundColorTitle"`
}
ColorsList defines all colors which can be overridden in the application.
type EditForm ¶
type EditForm struct {
SelectedTitle lipgloss.Style
Title lipgloss.Style
TextReadonly lipgloss.Style
}
EditForm contains styles for host edit components.
type InputStyles ¶
type InputStyles struct {
InputFocused lipgloss.Style
InputError lipgloss.Style
TextFocused lipgloss.Style
TextReadonly lipgloss.Style
TextNormal lipgloss.Style
}
InputStyles contains styles for input components.
type ListExtraStyles ¶
type Theme ¶
type Theme struct {
Name string `json:"name"`
Description string `json:"description"`
Colors ColorsList `json:"colors"`
Styles AppStyles `json:"-"` // Not serialized, computed from colors
}
Theme defines the color scheme and styling for the application.
func DefaultTheme ¶
func DefaultTheme() *Theme
DefaultTheme returns the default application theme. See cheat-sheet: https://www.ditig.com/publications/256-colors-cheat-sheet
Click to show internal directories.
Click to hide internal directories.