Framework

Lip Gloss – terminal styling and layout library

Lip Gloss is a library for styling terminal output and constructing text-based layouts using an approach inspired by CSS. It separates presentation from application logic, allowing developers to define reusable styles and apply them to terminal content.

The library handles the complexities of ANSI formatting and measuring displayed text in terminal cells rather than bytes. It can be used independently to format command-line output or combined with interactive frameworks such as Bubble Tea to construct more elaborate terminal interfaces.

This is free and open source software.

Key Features

  • Reusable and composable style definitions.
  • ANSI, indexed and 24-bit RGB colour support.
  • Automatic colour downsampling to match terminal capabilities.
  • Colour utilities for blending, lightening, darkening and calculating complementary colours.
  • Adaptive colours for light and dark terminal backgrounds.
  • Text attributes including bold, italic, underline, strikethrough and reverse video.
  • Configurable borders, margins, padding and alignment.
  • Width and height constraints with content wrapping.
  • ANSI-aware text wrapping that preserves styling and hyperlinks.
  • Horizontal and vertical composition of styled text blocks.
  • Accurate measurement of rendered content in terminal cells.
  • Customizable table rendering.
  • One-dimensional and two-dimensional colour gradients.
  • Cell-based compositing with independently positioned layers and stacking order.
  • Layer hit-testing for interactive applications.

Website: github.com/charmbracelet/lipgloss
Support:
Developer: Charmbracelet, Inc
License: MIT License

Lip Gloss

Lip Gloss is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Go TUI Frameworks
termuiGolang terminal dashboard
Bubble TeaFun, functional and stateful way to build terminal apps
tviewTerminal UI library with rich, interactive widgets
gocuiMinimalist Go package aimed at creating Console User Interfaces.
TcellLow-level Go package for portable terminal screen handling and input
PTermGo library for styled output, progress displays, and interactive prompts
Huh?Go library for elegant, accessible interactive forms and prompts
CobraLibrary for creating powerful modern CLI applications
BubblesReusable components for composing polished Bubble Tea applications
go-tuiDeclarative toolkit for building interactive terminal applications
cviewTerminal-based user interface toolkit (fork of tview)
gotuiModern Go library for creating rich interactive terminal interfaces
PhoenixHigh-performance toolkit for building responsive terminal interfaces
Lip GlossStyle definitions for nice terminal layouts

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted