style

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package style is the CLI look: one palette, named styles and the shared header and table.

Index

Constants

This section is empty.

Variables

View Source
var Default = Theme{
	Accent:  "#E5B33A",
	Muted:   "#8E8E93",
	Subtle:  "#636366",
	Error:   "#FF453A",
	Success: "#30D158",
}

Default is the only place colors live: change them here to follow the web theme.

Functions

func Accent

func Accent() lipgloss.Style

func ColorAccent

func ColorAccent() color.Color

func ColorError

func ColorError() color.Color

func ColorMuted

func ColorMuted() color.Color

func ColorSubtle

func ColorSubtle() color.Color

func ColorSuccess

func ColorSuccess() color.Color

func Empty

func Empty() lipgloss.Style

Empty renders the message of a list without rows.

func Error

func Error() lipgloss.Style

func Filter

func Filter(styles textinput.Styles) textinput.Styles

Filter colors the prompt of a filter input with the accent.

func Header(title, path, info string) string

Header renders the three lines above a list: bold title, muted path, subtle info.

func Key

func Key() lipgloss.Style

Key renders a shortcut in the footer.

func Markdown

func Markdown(isDark bool) ansi.StyleConfig

Markdown is glamour's standard style with the palette: no margin (aligned with the path above), text in the terminal color, headings and link texts in accent, rules and quotes muted.

func Muted

func Muted() lipgloss.Style

func Subtle

func Subtle() lipgloss.Style

func Table

func Table(rows [][]string, cursor, main int) string

Table aligns the cells in columns, the main one in the terminal color and the others muted. cursor marks that row with an accent ›; cursor < 0 marks none and drops the margin (for a pipe).

func Title

func Title() lipgloss.Style

Types

type Theme

type Theme struct {
	Accent  string
	Muted   string
	Subtle  string
	Error   string
	Success string
}

Theme holds the UI colors, as hex or ANSI codes. Text has none: the terminal's own stays readable on light and dark.

Jump to

Keyboard shortcuts

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