styles

package
v0.69.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 4 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoundedBorder

func RoundedBorder() lipgloss.Border

RoundedBorder returns a rounded border style for lipgloss

Types

type CommonStyles

type CommonStyles struct {
	Header          lipgloss.Style
	Border          lipgloss.Style
	Separator       lipgloss.Style
	Input           lipgloss.Style
	Status          lipgloss.Style
	HelpBar         lipgloss.Style
	Conversation    lipgloss.Style
	BashIndicator   lipgloss.Style
	ModelIndicator  lipgloss.Style
	PlaceholderText lipgloss.Style
}

CommonStyles contains reusable lipgloss styles

func NewCommonStyles

func NewCommonStyles() *CommonStyles

NewCommonStyles creates a new set of common styles with consistent theming

type Provider added in v0.56.0

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

Provider centralizes all styling logic and provides complete abstraction from Lipgloss. Components should NEVER import lipgloss directly - they interact with styling through this provider.

func NewProvider added in v0.56.0

func NewProvider(themeService domain.ThemeService) *Provider

NewProvider creates a new style provider

func (*Provider) GetHeight added in v0.56.0

func (p *Provider) GetHeight(s string) int

GetHeight returns the rendered height of a string

func (*Provider) GetSpinnerStyle added in v0.56.0

func (p *Provider) GetSpinnerStyle() lipgloss.Style

GetSpinnerStyle returns a lipgloss.Style for use with third-party components like Bubbles spinner This is an exception to complete abstraction, needed for library compatibility

func (*Provider) GetThemeColor added in v0.56.0

func (p *Provider) GetThemeColor(colorName string) string

GetThemeColor returns a theme color for custom styling (use sparingly)

func (*Provider) GetThemeService added in v0.61.0

func (p *Provider) GetThemeService() domain.ThemeService

GetThemeService returns the underlying theme service for advanced integrations This is needed for components like the markdown renderer that need direct theme access

func (*Provider) GetWidth added in v0.56.0

func (p *Provider) GetWidth(s string) int

GetWidth returns the rendered width of a string

func (*Provider) JoinHorizontal added in v0.56.0

func (p *Provider) JoinHorizontal(strs ...string) string

JoinHorizontal joins strings horizontally

func (*Provider) JoinVertical added in v0.56.0

func (p *Provider) JoinVertical(strs ...string) string

JoinVertical joins strings vertically

func (*Provider) PlaceCenter added in v0.56.0

func (p *Provider) PlaceCenter(width, height int, content string) string

PlaceCenter places content in the center of the given dimensions

func (*Provider) PlaceCenterTop added in v0.56.0

func (p *Provider) PlaceCenterTop(width, height int, content string) string

PlaceCenterTop places content in the center-top of the given dimensions

func (*Provider) PlaceHorizontal added in v0.56.0

func (p *Provider) PlaceHorizontal(width int, left string, right string) string

PlaceHorizontal places two components horizontally with the second one on the right

func (*Provider) RenderApprovalButton added in v0.56.0

func (p *Provider) RenderApprovalButton(text string, selected bool, isApprove bool) string

RenderApprovalButton renders an approval-style button with custom colors and fixed width

func (*Provider) RenderAssistantText added in v0.56.0

func (p *Provider) RenderAssistantText(text string) string

RenderAssistantText renders text in the assistant color

func (*Provider) RenderBold added in v0.56.0

func (p *Provider) RenderBold(text string) string

RenderBold renders text with bold styling

func (*Provider) RenderBoldText added in v0.56.0

func (p *Provider) RenderBoldText(text string) string

RenderBoldText renders bold text

func (*Provider) RenderBordered added in v0.56.0

func (p *Provider) RenderBordered(content string, width int) string

RenderBordered renders content with a border

func (*Provider) RenderBorderedBox added in v0.56.0

func (p *Provider) RenderBorderedBox(text, borderColor string, paddingV, paddingH int) string

RenderBorderedBox renders text inside a rounded border with padding

func (*Provider) RenderButton added in v0.56.0

func (p *Provider) RenderButton(text string, selected bool) string

RenderButton renders a button or selectable option

func (*Provider) RenderCenteredBoldWithColor added in v0.56.0

func (p *Provider) RenderCenteredBoldWithColor(text, hexColor string, width int) string

RenderCenteredBoldWithColor renders text centered, bold, and with a specific color

func (*Provider) RenderCenteredBorderedBox added in v0.56.0

func (p *Provider) RenderCenteredBorderedBox(text, borderColor string, width, height, paddingV, paddingH int) string

RenderCenteredBorderedBox renders text in a centered bordered box with specified dimensions

func (*Provider) RenderCodeBlock added in v0.56.0

func (p *Provider) RenderCodeBlock(code string, width int) string

RenderCodeBlock renders a code block with subtle background

func (*Provider) RenderCreatedText added in v0.60.0

func (p *Provider) RenderCreatedText(text string) string

RenderCreatedText renders "created" status text (success color, bold)

func (*Provider) RenderCursor added in v0.56.0

func (p *Provider) RenderCursor(text string) string

RenderCursor renders text with cursor styling

func (*Provider) RenderDiffAddition added in v0.56.0

func (p *Provider) RenderDiffAddition(content string) string

RenderDiffAddition renders a diff addition line

func (*Provider) RenderDiffRemoval added in v0.56.0

func (p *Provider) RenderDiffRemoval(content string) string

RenderDiffRemoval renders a diff removal line

func (*Provider) RenderDimText added in v0.56.0

func (p *Provider) RenderDimText(text string) string

RenderDimText renders text in a dimmed style

func (*Provider) RenderErrorIcon added in v0.60.0

func (p *Provider) RenderErrorIcon(text string) string

RenderErrorIcon renders an error icon (X mark, etc.)

func (*Provider) RenderErrorText added in v0.56.0

func (p *Provider) RenderErrorText(text string) string

RenderErrorText renders text in the error color

func (*Provider) RenderHeader added in v0.56.0

func (p *Provider) RenderHeader(text string, width int) string

RenderHeader renders a centered header

func (*Provider) RenderInputField added in v0.56.0

func (p *Provider) RenderInputField(content string, width int, focused bool) string

RenderInputField renders an input field with border

func (*Provider) RenderInputPlaceholder added in v0.56.0

func (p *Provider) RenderInputPlaceholder(text string) string

RenderInputPlaceholder renders placeholder text

func (*Provider) RenderLeftAlignedBorderedBox added in v0.56.0

func (p *Provider) RenderLeftAlignedBorderedBox(text, borderColor string, width, height, paddingV, paddingH int) string

RenderLeftAlignedBorderedBox renders text in a left-aligned bordered box with specified dimensions

func (*Provider) RenderListItem added in v0.56.0

func (p *Provider) RenderListItem(content string, selected bool) string

RenderListItem renders a list item (selected or unselected)

func (*Provider) RenderListItemWithDescription added in v0.56.0

func (p *Provider) RenderListItemWithDescription(title, description string, selected bool) string

RenderListItemWithDescription renders a list item with a description

func (*Provider) RenderMetricText added in v0.60.0

func (p *Provider) RenderMetricText(text string) string

RenderMetricText renders metric/info text (e.g., byte counts, line counts)

func (*Provider) RenderModal added in v0.56.0

func (p *Provider) RenderModal(content string, width int) string

RenderModal renders a modal with rounded border

func (*Provider) RenderModalTitle added in v0.56.0

func (p *Provider) RenderModalTitle(title string) string

RenderModalTitle renders a modal title with emphasis

func (*Provider) RenderPathText added in v0.60.0

func (p *Provider) RenderPathText(text string) string

RenderPathText renders a file path with accent color and bold

func (*Provider) RenderSeparator added in v0.56.0

func (p *Provider) RenderSeparator(width int, char string) string

RenderSeparator renders a horizontal separator line

func (*Provider) RenderSpinner added in v0.56.0

func (p *Provider) RenderSpinner(frame string) string

RenderSpinner renders a spinner with status color

func (*Provider) RenderStatusBadge added in v0.56.0

func (p *Provider) RenderStatusBadge(text string, positive bool) string

RenderStatusBadge renders a status badge (e.g., "ENABLED", "DISABLED")

func (*Provider) RenderStyledText added in v0.56.0

func (p *Provider) RenderStyledText(text string, opts StyleOptions) string

RenderStyledText renders text with custom Lipgloss-compatible styling This is an escape hatch for complex styling not covered by other methods

func (*Provider) RenderSuccessIcon added in v0.60.0

func (p *Provider) RenderSuccessIcon(text string) string

RenderSuccessIcon renders a success icon (checkmark, etc.)

func (*Provider) RenderSuccessText added in v0.56.0

func (p *Provider) RenderSuccessText(text string) string

RenderSuccessText renders text in the success color

func (*Provider) RenderTextSelection added in v0.56.0

func (p *Provider) RenderTextSelection(text string) string

RenderTextSelection renders text with selection highlighting (accent background)

func (*Provider) RenderTextSelectionCursor added in v0.56.0

func (p *Provider) RenderTextSelectionCursor(char string) string

RenderTextSelectionCursor renders a cursor character for text selection mode

func (*Provider) RenderTopAlignedBorderedBox added in v0.56.0

func (p *Provider) RenderTopAlignedBorderedBox(text, borderColor string, width, height, paddingV, paddingH int) string

RenderTopAlignedBorderedBox renders text in a top-left aligned bordered box with specified dimensions

func (*Provider) RenderUpdatedText added in v0.60.0

func (p *Provider) RenderUpdatedText(text string) string

RenderUpdatedText renders "updated" status text (status/warning color, bold)

func (*Provider) RenderUserText added in v0.56.0

func (p *Provider) RenderUserText(text string) string

RenderUserText renders text in the user color

func (*Provider) RenderVisualLineSelection added in v0.56.0

func (p *Provider) RenderVisualLineSelection(text string) string

RenderVisualLineSelection renders a full line with visual line selection styling

func (*Provider) RenderWarningText added in v0.56.0

func (p *Provider) RenderWarningText(text string) string

RenderWarningText renders text in the warning/status color

func (*Provider) RenderWithColor added in v0.56.0

func (p *Provider) RenderWithColor(text, hexColor string) string

RenderWithColor renders text with a specific hex color

func (*Provider) RenderWithColorAndBold added in v0.56.0

func (p *Provider) RenderWithColorAndBold(text, hexColor string) string

RenderWithColorAndBold renders text with color and bold

type StyleOptions added in v0.56.0

type StyleOptions struct {
	Foreground   string
	Background   string
	Bold         bool
	Italic       bool
	Faint        bool
	Width        int
	Padding      [2]int
	MarginBottom int
	MarginTop    int
}

StyleOptions provides options for custom text styling

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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