A Go library for styling terminal user interfaces with CSS-like declarative syntax and advanced layout utilities.
Lip Gloss is a Go library for building styled terminal user interfaces (TUIs) with a declarative, CSS-like syntax. It provides style definitions and layout utilities to create complex terminal layouts while automatically handling color profiles and terminal compatibility.
Go developers building terminal applications, CLI tools, or TUIs who need advanced styling, layout management, and cross-terminal compatibility.
Developers choose Lip Gloss for its expressive, CSS-like API that simplifies terminal styling, its automatic color downsampling and terminal compatibility, and its rich component library for tables, lists, and trees.
Style definitions for nice terminal layouts 👄
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Lip Gloss provides a familiar API with properties like padding, margins, and borders using shorthand syntax similar to CSS, making it intuitive for web developers to style terminal interfaces.
It supports ANSI 16, 256, and True Color profiles with automatic downsampling, adaptive colors for light/dark terminals, and color blending utilities, ensuring broad terminal compatibility.
Includes compositing layers, joining paragraphs, and placing text in whitespace, enabling complex terminal layouts without manual coordinate calculations, as shown in the canvas and compositing examples.
The library ships with sub-packages for rendering tables, lists, and trees with extensive customization, such as markdown-style borders and nested enumerators.
Lip Gloss is solely focused on styling and layout; for event handling and state management in TUIs, developers must integrate it with additional frameworks like Bubble Tea, adding complexity.
The README includes an upgrade guide from v1 to v2, indicating that major version updates can introduce breaking changes, requiring code adjustments and migration efforts.
For applications that only require basic terminal output, the comprehensive feature set of Lip Gloss might add unnecessary dependency bloat and learning curve compared to simpler alternatives.