styles

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClipANSI

func ClipANSI(content string, width int) string

ClipANSI truncates styled text to width cells safely.

func Row

func Row(bg, fg color.Color, width int, content string) string

Row returns a fully-painted row string of exactly width cells.

This is the canonical way to render any row in a component or bento. Every cell has an explicit Bg so the Ultraviolet surface overlay does not fall back to the canvas color for padding/whitespace cells.

Rule: never use lipgloss.PlaceHorizontal or bare Render(content) for rows that sit on a surface — always go through Row() or an equivalent .Background().Width(w).Render() chain.

func RowClip

func RowClip(bg, fg color.Color, width int, content string) string

RowClip clips ANSI content first, then paints an exact-width row.

Types

This section is empty.

Jump to

Keyboard shortcuts

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