styles

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package styles provides background-aware terminal styles. Construct a bundle with New for the appropriate light or dark variant.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Styles added in v1.6.0

type Styles struct {
	// Palette. Primary and Danger are static; the rest adapt to background.
	Primary, Danger,
	Secondary, Success, Warning,
	Muted, Text, Border color.Color

	// Composed styles.
	TextStyle               lipgloss.Style
	MutedStyle              lipgloss.Style
	SuccessStyle            lipgloss.Style
	WarningStyle            lipgloss.Style
	DangerStyle             lipgloss.Style
	SelectedStyle           lipgloss.Style
	CursorStyle             lipgloss.Style
	SizeStyle               lipgloss.Style
	HelpStyle               lipgloss.Style
	HeaderStyle             lipgloss.Style
	DividerStyle            lipgloss.Style
	ButtonStyle             lipgloss.Style
	ButtonActiveStyle       lipgloss.Style
	ButtonDangerStyle       lipgloss.Style
	ButtonDangerActiveStyle lipgloss.Style
	SectionActiveNameStyle  lipgloss.Style
}

func New added in v1.6.0

func New(isDark bool) Styles

New returns a Styles configured for the given terminal background.

func (Styles) Divider added in v1.6.0

func (s Styles) Divider(width int) string

Divider renders a horizontal line of the given width.

func (Styles) SafetyDot added in v1.6.0

func (s Styles) SafetyDot(level types.SafetyLevel) string

Jump to

Keyboard shortcuts

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