tui

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const HighlightSymbol = "▶ "

Variables

View Source
var (
	GeckoGreen = lipgloss.Color("#8CC351")
	Gold       = lipgloss.Color("#FFE866")
)

Brand colors matching CoinGecko identity.

View Source
var (
	HeaderStyle   = lipgloss.NewStyle().Bold(true).Foreground(Gold)
	SelectedStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("0")).Background(GeckoGreen)
	HelpStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color("242"))
	GreenStyle    = lipgloss.NewStyle().Foreground(lipgloss.Color("82"))
	RedStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("196"))
	DimStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("242"))
	TitleStyle    = lipgloss.NewStyle().Bold(true).Foreground(GeckoGreen)
	LabelStyle    = lipgloss.NewStyle().Bold(true).Foreground(Gold)
)

Functions

func BrandTitle added in v1.0.2

func BrandTitle(subtitle string) string

BrandTitle returns the branded title line: ◆ CoinGecko <subtitle>

func ColorPercent

func ColorPercent(pct float64, s string) string

func FrameStyle added in v1.0.2

func FrameStyle(width, height int) lipgloss.Style

FrameStyle returns a bordered lipgloss style for the TUI outer frame.

Types

type DetailModel

type DetailModel struct {
	Done bool
	// contains filtered or unexported fields
}

func NewDetailModel

func NewDetailModel(client *api.Client, coinID, vs string, width, height int) DetailModel

func (DetailModel) Init

func (m DetailModel) Init() tea.Cmd

func (DetailModel) Update

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

func (DetailModel) View

func (m DetailModel) View() string

type MarketsModel

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

func NewMarketsModel

func NewMarketsModel(client *api.Client, vs, category string, total int) MarketsModel

func (MarketsModel) Init

func (m MarketsModel) Init() tea.Cmd

func (MarketsModel) Update

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

func (MarketsModel) View

func (m MarketsModel) View() string

type TrendingModel

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

func NewTrendingModel

func NewTrendingModel(client *api.Client, vs, showMax string) TrendingModel

func (TrendingModel) Init

func (m TrendingModel) Init() tea.Cmd

func (TrendingModel) Update

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

func (TrendingModel) View

func (m TrendingModel) View() string

Jump to

Keyboard shortcuts

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