panels

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PaletteCyber   = theme.PaletteCyber
	PaletteMatrix  = theme.PaletteMatrix
	PaletteDracula = theme.PaletteDracula
	PaletteNord    = theme.PaletteNord
)
View Source
var (
	StyleTitle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(PaletteCyber.AccentPrimary)).
				Bold(true)

	StyleTitleDim = lipgloss.NewStyle().
					Foreground(lipgloss.Color(PaletteCyber.Muted))

	StyleHint = lipgloss.NewStyle().
				Foreground(lipgloss.Color(PaletteCyber.Muted))

	BorderActive = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(lipgloss.Color(PaletteCyber.BorderActive))

	BorderDim = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(lipgloss.Color(PaletteCyber.BorderDim))

	ColorActiveBorder = PaletteCyber.BorderActive

	ColorBG = PaletteCyber.BG
)

Shared TUI style variables — initialised from PaletteCyber, rebuilt by ApplyBaseStyles.

Functions

func ApplyBaseStyles added in v1.2.0

func ApplyBaseStyles(p Palette)

ApplyBaseStyles rebuilds all shared style vars from the given palette.

func Bar

func Bar(left, right string, width int) string

Bar lays out left + spaces + right to fill width.

func HelpOverlay

func HelpOverlay(base, helpContent, borderColor string, width int) string

HelpOverlay centers helpContent over base as a rounded-border modal.

func Pad

func Pad(s string, width int) string

Pad right-pads s with spaces to fill width.

func PanelTitle added in v1.2.0

func PanelTitle(title string, active bool) string

PanelTitle renders a panel header, highlighted when active.

func SearchBar(label, query, suffix string, width int, accentStyle lipgloss.Style) string

SearchBar renders a search-mode prompt line padded to width. label is the prompt label (e.g. "SEARCH", "SCANNING"). query is the current search text. suffix is appended after the closing bracket (match counts, hints, etc.). accentStyle is applied to the brackets, cursor, and query text.

func WrapPanel added in v1.2.0

func WrapPanel(content string, active bool, width, height int) string

WrapPanel wraps content in a rounded border, highlighted when active.

Types

type Palette

type Palette = theme.Palette

Palette is an alias for theme.Palette.

func ResolvePalette

func ResolvePalette(name string) Palette

ResolvePalette delegates to theme.ResolvePalette.

Jump to

Keyboard shortcuts

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