tui

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New(root string) Model

func NewWithConfig added in v0.7.0

func NewWithConfig(root, themeName, plan string, onboardingSeen bool, tabViewCount map[string]int) Model

NewWithConfig creates a Model with theme, plan, onboarding state, and tab-view counts pre-applied. plan is one of "pro", "max-5x", "max-20x", or "" (no quota UI).

func NewWithTheme added in v0.5.0

func NewWithTheme(root, themeName string) Model

NewWithTheme creates a Model with the given named theme pre-applied. Valid names: "dark", "light", "high-contrast". Falls back to "dark".

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Theme added in v0.5.0

type Theme struct {
	Name string

	// Base colors
	Primary  lipgloss.Color
	Accent   lipgloss.Color
	Muted    lipgloss.Color
	Good     lipgloss.Color
	Warn     lipgloss.Color
	Fg       lipgloss.Color
	FgDim    lipgloss.Color
	Selected lipgloss.Color

	// Derived styles (precomputed from the colors above, same shape as styles.go)
	Title     lipgloss.Style
	Tab       lipgloss.Style
	TabActive lipgloss.Style
	HeaderBar lipgloss.Style
	Footer    lipgloss.Style
	Section   lipgloss.Style
	Card      lipgloss.Style
	CardLabel lipgloss.Style
	CardValue lipgloss.Style
	Accent_   lipgloss.Style
	Good_     lipgloss.Style
	Warn_     lipgloss.Style
	Error_    lipgloss.Style
}

Theme holds the color palette and all precomputed derived styles for one theme.

Jump to

Keyboard shortcuts

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