30 June 2025

So Hot Right Now: Lip Gloss v2 Beta 2

By Andrey Nering

This release builds on top of the last Beta 1 release. It includes a new API for compositing layers and views, table enhancements, and a bunch of bug fixes. Let’s get into it!

Compositing

Compositing looks so nice, doesn't it?

The big news in this release is compositing. Here’s what it looks like:

box := lipgloss.NewStyle().
    Width(10).
    Height(5).
    Border(lipgloss.NormalBorder())

// Make some layers.
a := lipgloss.NewLayer(box.Render("Who wants marmalade?"))
b := lipgloss.NewLayer(box.Render("I do!"))

// Put layers in a canvas.
canvas := lipgloss.NewCanvas(
    a.X(5).Y(10).Z(1),
    b.X(3).Y(7)
)

// Render it all out.
lipgloss.Println(canvas.Render())

Also note that layers can also be nested (see Layer.AddLayers). Otherwise, that’s all there is to it!

For more info see Layer, Canvas, and the compositing example.

Big shout out to @aymanbagabas for his work on this feature!

Table Enhancements

Tables are one of the most beloved Charm components, and we’ve been working to make them as polished as possible. In this release I (@andreynering) fixed several bugs and did many other rendering enhancements. You can check most of the fixes in this pull request.

We’re also refactoring the Bubbles’ table component to use the Lip Gloss’ table package, and making their APIs similar, as before they were relatively different. This means that if you use Tables via Bubbles in your Bubble Tea app, you’ll be able to reap the benefits soon too!

Whatcha think?

Have some feedback on this post? We’d love to hear. Let us know in Discord or via email at vt100@charm.sh.

EOF

Read this post in your terminal with Glow:

glow -p https://charm.sh/blog/lipgloss-v2-beta-2.md Copied!

By Andrey Nering

30 June 2025

Andrey Nering is a developer at Charm, working on the many open source projects. He loves building tools that make developers' lives easier.

Lets chat!

Have a question about a command line thing you’re building? Got an idea for a new feature? Just wanna hang out? You’re always welcome in the Charm Discord.