tui

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoStyle = lipgloss.NewStyle()

	Faint  = lipgloss.NewStyle().Faint(true)
	Red    = lipgloss.NewStyle().Foreground(lipgloss.Red)
	Green  = lipgloss.NewStyle().Foreground(lipgloss.Green)
	Yellow = lipgloss.NewStyle().Foreground(lipgloss.Yellow)

	Bold       = lipgloss.NewStyle().Bold(true)
	BoldRed    = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Red)
	BoldGreen  = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Green)
	BoldYellow = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Yellow)

	NameStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("152"))
)

Functions

func Confirm

func Confirm(title string) (bool, error)

Confirm shows a confirmation prompt with a yellow-styled title. If title is empty, it defaults to "Do you want to continue?".

func FormatImage

func FormatImage(image string, style lipgloss.Style) string

FormatImage renders an image reference with the given style, using a faint colon separator for tagged images. Returns the styled original string if parsing fails.

func IsStdinTerminal

func IsStdinTerminal() bool

IsStdinTerminal checks if the standard input is a terminal (TTY).

func IsStdoutTerminal

func IsStdoutTerminal() bool

IsStdoutTerminal checks if the standard output is a terminal (TTY).

func NewTable

func NewTable() *table.Table

NewTable creates a borderless table with bold headers and consistent padding for CLI output.

func PrintWarning

func PrintWarning(msg string)

func TerminalWidth

func TerminalWidth() int

TerminalWidth returns the width of the terminal. Returns 0 if stdout is not a terminal or the width cannot be determined.

func ThemeConfirm

func ThemeConfirm() huh.Theme

ThemeConfirm returns a huh theme with a bold yellow title style for the confirmation prompt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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